The HEAD method is identical to GET except that the server MUST NOT send a message body in the response.
Header parity rule
According to RFC 9110 Section 9.3.2: The server ought to return the same header fields in a response to HEAD as it would have returned if the request had been a GET.
This means headers like Content-Length, Content-Type, ETag, and Last-Modified reflect the size and properties of the actual payload without transmitting the body over the wire.
Key use cases for HEAD
- Pre-flighting large downloads: Check
Content-Lengthbefore committing to download a multi-gigabyte file. - Link health checkers: Automated bots check if URLs return
200 OKor404 Not Foundwithout wasting server bandwidth. - Cache revalidation: Fast ETag checking against CDNs.
How to test with curl
Use curl -I (--head) to send a HEAD request:
curl -I https://api.example.test/v1/large-dataset.csv
Key takeaway
The HEAD method allows clients to inspect response metadata (Content-Length, ETag, Last-Modified) and verify resource existence without downloading payload bytes.