Home » Html » cURL suppress response body

cURL suppress response body

Posted by: admin November 29, 2017 Leave a comment

Questions:

Is it possible instruct cURL to suppress output of response body ? ( in my case this is the page html )

For my cURL tests the page html overflows the cli buffer – making it difficult to find relevant info.

I want output to include http response code, headers, etc. — everything except actual page html.

Answers:

You can use the -o switch and null pseudo-file :

Unix

curl -s -o /dev/null -v http://google.com

Windows

curl -s -o nul -v http://google.com