summaryrefslogtreecommitdiff
path: root/src/tool_writeout_json.h
Commit message (Collapse)AuthorAgeFilesLines
* copyright: update copyright year ranges to 2021Daniel Stenberg2021-03-271-1/+1
| | | | | Reviewed-by: Emil Engler Closes #6802
* tool_writeout: refactor write-out and write-out jsonJay Satiro2021-02-091-2/+4
| | | | | | | | | | | | | | | | | | | | | - Deduplicate the logic used by write-out and write-out json. Rather than have separate writeLong, writeString, etc, logic for each of write-out and write-out json instead have respective shared functions that can output either format and a 'use_json' parameter to indicate whether it is json that is output. This will make it easier to maintain. Rather than have to go through two sets of logic now we only have to go through one. - Support write-out %{errormsg} and %{exitcode} in json. - Clarify in the doc that %{exitcode} is the exit code of the transfer. Prior to this change it just said "The numerical exitcode" which implies it's the exit code of the tool, and it's not necessarily that. Closes https://github.com/curl/curl/pull/6544
* curl.se: new homeDaniel Stenberg2020-11-041-1/+1
| | | | Closes #6172
* tool_writeout: add new writeout variable, %{num_headers}anio2020-09-151-2/+2
| | | | | | This variable gives the number of headers. Closes #5947
* writeout: support to generate JSON outputMathias Gumz2020-03-171-0/+30
This commit adds support to generate JSON via the writeout feature: -w "%{json}" It leverages the existing infrastructure as much as possible. Thus, generating the JSON on STDERR is possible by: -w "%{stderr}%{json}" This implements a variant of https://github.com/curl/curl/wiki/JSON#--write-out-json. Closes #4870