Difference between revisions of "Display HTTP response headers"
Jump to navigation
Jump to search
↑ https://stackoverflow.com/questions/3252851/how-to-display-request-headers-with-command-line-curl
(7 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
* Display [[HTTP]] response headers: | * Display [[HTTP]] response headers: | ||
− | : <code>curl -sD - -o /dev/null http://example.com</code><ref>https://stackoverflow.com/questions/3252851/how-to-display-request-headers-with-command-line-curl</ref> | + | : <code>curl -v http://example.com</code> |
+ | : <code>curl [[--insecure]] -sD - -o /dev/null http://example.com</code><ref>https://stackoverflow.com/questions/3252851/how-to-display-request-headers-with-command-line-curl</ref> | ||
:: -s Avoid showing progress bar | :: -s Avoid showing progress bar | ||
:: -D Dump headers to a file, but - sends it to stdout | :: -D Dump headers to a file, but - sends it to stdout | ||
:: -o /dev/null Ignore response body | :: -o /dev/null Ignore response body | ||
+ | |||
+ | |||
+ | |||
+ | > GET / HTTP/1.1 | ||
+ | > Host: 10.11.1.11:1234 | ||
+ | > [[User-Agent]]: curl/7.79.1 | ||
+ | > Accept: */* | ||
+ | > | ||
+ | * Mark bundle as not supporting multiuse | ||
+ | * [[HTTP 1.0]], assume close after body | ||
+ | < HTTP/1.0 200 OK | ||
+ | < Date: Fri, 27 Jan 2023 10:30:55 GMT | ||
+ | < Server: [[WSGIServer]]/0.2 [[CPython]]/3.9.16 | ||
+ | < Content-Type: text/plain; version=0.0.4; charset=utf-8 | ||
+ | < Content-Length: 5023 | ||
== Related terms == | == Related terms == | ||
− | * x-content-type-options: nosniff | + | * <code>x-content-type-options: nosniff</code> |
+ | * <code>[[curl]] --insecure https://yourdomain.com</code> | ||
+ | * <code>[[--header]]</code> | ||
== See also == | == See also == |
Latest revision as of 10:33, 27 January 2023
- Display HTTP response headers:
curl -v http://example.com
curl --insecure -sD - -o /dev/null http://example.com
[1]- -s Avoid showing progress bar
- -D Dump headers to a file, but - sends it to stdout
- -o /dev/null Ignore response body
> GET / HTTP/1.1 > Host: 10.11.1.11:1234 > User-Agent: curl/7.79.1 > Accept: */* > * Mark bundle as not supporting multiuse * HTTP 1.0, assume close after body < HTTP/1.0 200 OK < Date: Fri, 27 Jan 2023 10:30:55 GMT < Server: WSGIServer/0.2 CPython/3.9.16 < Content-Type: text/plain; version=0.0.4; charset=utf-8 < Content-Length: 5023
Related terms[edit]
x-content-type-options: nosniff
curl --insecure https://yourdomain.com
--header
See also[edit]
wget
,cURL
,links
,lynx
,elinks
,w3m
,httpie, opensearch-cli curl
,--no-check-certificate, wget --help
Advertising: