curl – I http://example.com

isn’t that enough?