QamoosTech
Web & APIsHTTP and requestsIntermediate

HTTP Header

Pronunciationaitch-tee-tee-pee HED-er

Definition

Extra information sent with a request or response, such as the content type or the authorization token.

Where you hear it

API docs, authentication, caching, and CORS issues.

Examples

  • Send the token in the Authorization header.
  • Set Content-Type: application/json or the server will not parse the body.
  • The response includes a Cache-Control header that tells the browser how long to keep it.

Common mistake

Forgetting that headers can be read and changed by the client. Never rely on them alone for security.

Don't confuse with

HTTP header is often confused with HTTP body; the header contains metadata about the request or response, while the body contains the actual data being transmitted.

Say it at work

  • In a meeting or chatCan you check the network tab and see if the custom HTTP header is being sent correctly in the request?
  • In an email or ticketPlease update the API documentation to specify which HTTP header is required for the authentication token.