Protocols
Saved & recent

HTTP headers

Also called: HTTP fields, request headers, response headers

HTTP headers are named fields that carry metadata and control instructions with a request or response. They can describe content, express preferences, carry credentials or guide caching. Field names are case-insensitive, though their encoding and some naming requirements depend on the HTTP version.

For example, a client’s Accept: application/json states a response preference, while the server’s Content-Type: application/json describes the content it actually sends. These fields play different roles. A header is not the message body, and adding a familiar field name does not make an application enforce its meaning automatically.

Read first
HTTP
Related
Content negotiation, HTTP caching, Authentication, HTTP authentication
Further reading
request headers Accept: application/json response headers Content-Type: application/json preferred format selected format {"title":"Networks"} JSON response content
Accept expresses the client’s preferred response format. Content-Type describes the returned content, while the JSON body occupies a separate part of the message.

View in the full Protocols collection