Skip to content

HTTP Header

A service line in an HTTP request or response that carries metadata: authorisation, the data format, information about the client.

Examples

  • Authorization: Bearer <token> — authorisation;
  • Content-Type: application/json — the data format;
  • User-Agent: Mozilla/5.0... — who is making the request.

Why It Is Worth Knowing

Headers are a common cause of trouble when working with an API: a WAF may block a particular header, and a server may require a mandatory one. Knowing how to read and change headers solves most 403 and 415 errors.

See Also

← All Terms