curl: add %{header_json} support in -w handling

Outputs all response headers as a JSON object.
This commit is contained in:
Daniel Stenberg 2022-03-17 17:55:06 +01:00
parent 2d45137e1e
commit 4133a69f2d
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
6 changed files with 66 additions and 10 deletions

View file

@ -52,6 +52,9 @@ option. (Added in 7.26.0)
The initial path curl ended up in when logging on to the remote FTP
server. (Added in 7.15.4)
.TP
.B header_json
A JSON object with all HTTP response headers from the recent transfer.
.TP
.B http_code
The numerical response code that was found in the last retrieved HTTP(S) or
FTP(s) transfer.