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

@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
* Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@ -26,7 +26,7 @@
void ourWriteOutJSON(FILE *stream, const struct writeoutvar mappings[],
struct per_transfer *per, CURLcode per_result);
void headerJSON(FILE *stream, struct per_transfer *per);
void jsonWriteString(FILE *stream, const char *in);
#endif /* HEADER_CURL_TOOL_WRITEOUT_H */