diff options
author | Jay Satiro <raysatiro@yahoo.com> | 2021-01-28 18:56:50 -0500 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2021-02-09 02:48:27 -0500 |
commit | 65ca2294619f865362332ceddc622db92d0f50a6 (patch) | |
tree | a1f2575bd296da4eee3c1dd4cc3552ab2b625010 /docs/cmdline-opts/write-out.d | |
parent | b9f11ae87564447e61533eeafea9a1caa4cfa31d (diff) | |
download | curl-65ca2294619f865362332ceddc622db92d0f50a6.tar.gz |
tool_writeout: refactor write-out and write-out json
- 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
Diffstat (limited to 'docs/cmdline-opts/write-out.d')
-rw-r--r-- | docs/cmdline-opts/write-out.d | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/docs/cmdline-opts/write-out.d b/docs/cmdline-opts/write-out.d index af5d0cf22..be8f75ad5 100644 --- a/docs/cmdline-opts/write-out.d +++ b/docs/cmdline-opts/write-out.d @@ -33,7 +33,7 @@ The Content-Type of the requested document, if there was any. The error message. (Added in 7.75.0) .TP .B exitcode -The numerical exitcode. (Added in 7.75.0) +The numerical exitcode of the transfer. (Added in 7.75.0) .TP .B filename_effective The ultimate filename that curl writes out to. This is only meaningful if curl |