CURL Print Only Header

Sometimes you need to debug, or test, some web-server and you only need to read the response header from your request. Curling and scrolling, or curling and less:ing… nah.

All you need to remember is -sIX GET:

~$ curl -sIX GET [URL]

Example output:

~$ curl -sIX GET https://curl.se/
HTTP/2 200
server: nginx/1.21.1
content-type: text/html
x-frame-options: SAMEORIGIN
...

Watch your head(er) 👾

Leave a Reply

Your email address will not be published. Required fields are marked *