HEAD
The HTTP method that asks for exactly the headers a GET would return, but without the body.
In more detail
HEAD is safe and idempotent. Its Content-Length reports the size the body would have had, not zero, so a client can check size or freshness before downloading. curl -I sends a HEAD request.
Example
curl -sI localhost:8765/tasksRelated terms
- HTTP method — The verb at the start of a web request that says what the client wants, such as GET to read or POST to create.
- safe method — An HTTP method, such as GET or HEAD, whose request is not meant to change anything on the server.
- Content-Length — The header that gives the size of the message body in bytes.
Taught in
- HTTP Methods And Status Codes — Modern API Architecture: REST, GraphQL & gRPC
- Headers And Content Negotiation — Modern API Architecture: REST, GraphQL & gRPC