Ah, great catch. Added a note about having to specify the method explicitly / that -I uses HEAD implicitly. Thanks!
curl -o/dev/null -D- http://www.example.com
-I does not work with methods other than GET. This does the job.-i, --include (HTTP) Include the HTTP-header in the output. The HTTP-header includes things like server-name, date of the document, HTTP-version and more...
-I, --head (HTTP/FTP/FILE) Fetch the HTTP-header only! HTTP-servers feature the command HEAD which this uses to get nothing but the header of a document. When used on an FTP or FILE file, curl displays the file size and last modification time only.