curl/docs/cmdline-opts/show-headers.md
Daniel Stenberg a575601b5b
show-headers.md: mention bold headers and --no-styled-output
Mentioned-by: Sollace on github
Fixes #21495
Closes #21497
2026-05-04 17:31:08 +02:00

1.3 KiB

c SPDX-License-Identifier Long Short Help Protocols Category Added Multi See-also Example
Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al. curl show-headers i Show response headers in output HTTP FTP important verbose output 4.8 boolean
verbose
dump-header
-i $URL

--show-headers

Show response headers in the output. HTTP response headers can include things like server name, cookies, date of the document, HTTP version and more. With non-HTTP protocols, the "headers" are other server communication.

This option makes the response headers get saved in the same stream/output as the data. --dump-header exists to save headers in a separate stream.

When HTTP headers are output to a tty, curl may use escape codes to make the header field names appear in bold and URLs in Location: headers be especially marked as such. Disable the use of terminal escape codes with --no-styled-output. (This means using the --styled-output option with a --no- prefix to disable it.)

To view the request headers, consider the --verbose option.

Prior to 7.75.0 curl did not print the headers if --fail was used in combination with this option and there was an error reported by the server.

This option was called --include before 8.10.0. The previous name remains functional.