Skip to content

Latest commit

 

History

History
executable file
·
21 lines (14 loc) · 534 Bytes

curl-showing-http-headers.md

File metadata and controls

executable file
·
21 lines (14 loc) · 534 Bytes

Curl Showing HTTP Headers

The curl command can either display headers in the console or write the header output from an HTTP response to file.

Display headers in the console using the -v flag:

curl -v https://www.google.com

Write headers to an external file using the -D flag:

curl -D http-headers.txt 'https://cms-assets.tutsplus.com/uploads/users/30/posts/23880/image/download-attribute-caniuse.png' > image.png

Show the header output from the previous command:

cat http-headers.txt