xref: /curl/docs/cmdline-opts/show-headers.md (revision ca6d3d2e)
1---
2c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
3SPDX-License-Identifier: curl
4Long: show-headers
5Short: i
6Help: Show response headers in output
7Protocols: HTTP FTP
8Category: important verbose output
9Added: 4.8
10Multi: boolean
11See-also:
12  - verbose
13  - dump-header
14Example:
15  - -i $URL
16---
17
18# `--show-headers`
19
20Show response headers in the output. HTTP response headers can include things
21like server name, cookies, date of the document, HTTP version and more. With
22non-HTTP protocols, the "headers" are other server communication.
23
24This option makes the response headers get saved in the same stream/output as
25the data. --dump-header exists to save headers in a separate stream.
26
27To view the request headers, consider the --verbose option.
28
29Prior to 7.75.0 curl did not print the headers if --fail was used in
30combination with this option and there was error reported by server.
31
32This option was called --include before 8.10.0. The previous name remains
33functional.
34