-w, --write-out <format>
Make curl display information on stdout after a completed transfer. The format is a string that may contain plain text mixed with any number of variables. The
format can be specified as a literal "string", or you can have curl read the format from a file with "@filename" and to tell curl to read the format from
stdin you write "@-".
The variables present in the output format will be substituted by the value or text that curl thinks fit, as described below. All variables are specified as
%{variable_name} and to output a normal % you just write them as %%. You can output a newline by using \n, a carriage return with \r and a tab space with \t.
The output will be written to standard output, but this can be switched to standard error by using %{stderr}.
NOTE: The %-symbol is a special symbol in the win32-environment, where all occurrences of % must be doubled when using this option.
% content_type The Content-Type of the requested document, if there was any.
% 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 -O, --remote-name or -o, --output option. It's most useful in combination with the -J, --remote-header-name option. (Added in 7.26.0)'
% ftp_entry_path The initial path curl ended up in when logging on to the remote FTP server. (Added in 7.15.4)
% http_code The numerical response code that was found in the last retrieved HTTP(S) or FTP(s) transfer. In 7.18.2 the alias response_code was added to show the same info.
% http_connect The numerical code that was found in the last response (from a proxy) to a curl CONNECT request. (Added in 7.12.4)
% http_version The http version that was effectively used. (Added in 7.50.0)
% local_ip The IP address of the local end of the most recently done connection - can be either IPv4 or IPv6 (Added in 7.29.0)
% local_port The local port number of the most recently done connection (Added in 7.29.0)
% num_connects Number of new connects made in the recent transfer. (Added in 7.12.3)
% num_redirects Number of redirects that were followed in the request. (Added in 7.12.3)
% 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)'
% redirect_url When an HTTP request was made without -L, --location to follow redirects (or when --max-redir is met), this variable will show the actual URL a redirect would have gone to. (Added in 7.18.2)
% remote_ip The remote IP address of the most recently done connection - can be either IPv4 or IPv6 (Added in 7.29.0)
% remote_port The remote port number of the most recently done connection (Added in 7.29.0)