HEADrequest changes the output I get, so I really do want to
GETand then only see the headers.
Handily, when you use the
-v verbose flag with curl, it sends the output to stdout as usual, but the extra information including the headers goes to stderr. This means that I can therefore view the headers only throwing away stdout completely:
curl -v -s http://awesome-site.com 1> /dev/null
(you need the
-s to stop curl from "helpfully" printing progress bars as well)