summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2020-12-14 10:09:51 +0100
committerDaniel Stenberg <daniel@haxx.se>2020-12-21 16:38:48 +0100
commit7a90ddf88f5a1b313ecd28e1ec064d8351b0ddf2 (patch)
tree0b0b2a7df6ae8039b6eb61ca75d9f7eb2eaea76f /docs
parentebdb5f23ccb0b658263f212ecbb52b10a03187dd (diff)
downloadcurl-7a90ddf88f5a1b313ecd28e1ec064d8351b0ddf2.tar.gz
curl: add variables to --write-out
In particular, these ones can help a user to create its own error message when one or transfers fail. writeout: add 'onerror', 'url', 'urlnum', 'exitcode', 'errormsg' onerror - lets a user only show the rest on non-zero exit codes url - the input URL used for this transfer urlnum - the numerical URL counter (0 indexed) for this transfer exitcode - the numerical exit code for the transfer errormsg - obvious Reported-by: Earnestly on github Fixes #6199 Closes #6207
Diffstat (limited to 'docs')
-rw-r--r--docs/cmdline-opts/write-out.d16
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/cmdline-opts/write-out.d b/docs/cmdline-opts/write-out.d
index 28b9a13a9..af5d0cf22 100644
--- a/docs/cmdline-opts/write-out.d
+++ b/docs/cmdline-opts/write-out.d
@@ -29,6 +29,12 @@ The variables available are:
.B content_type
The Content-Type of the requested document, if there was any.
.TP
+.B errormsg
+The error message. (Added in 7.75.0)
+.TP
+.B exitcode
+The numerical exitcode. (Added in 7.75.0)
+.TP
.B filename_effective
The ultimate filename that curl writes out to. This is only meaningful if curl
is told to write to a file with the --remote-name or --output
@@ -74,6 +80,10 @@ The number of response headers in the most recent request (restarted at each
.B num_redirects
Number of redirects that were followed in the request. (Added in 7.12.3)
.TP
+.B onerror
+The rest of the output is only shown if the transfer returned a non-zero error
+(Added in 7.75.0)
+.TP
.B proxy_ssl_verify_result
The result of the HTTPS proxy's SSL peer certificate verification that was
requested. 0 means the verification was successful. (Added in 7.52.0)
@@ -161,6 +171,12 @@ server needed to calculate the result.
.B time_total
The total time, in seconds, that the full operation lasted.
.TP
+.B url
+The URL that was fetched. (Added in 7.75.0)
+.TP
+.B urlnum
+The URL index number of this transfer, 0-indexed. (Added in 7.75.0)
+.TP
.B url_effective
The URL that was fetched last. This is most meaningful if you've told curl
to follow location: headers.