HTTP Header List

Every HTTP header you'll meet in practice, what it does, and an example value. Need to send one? Grab a ready-made curl command and convert it to any language.

Request headers

HeaderWhat it doesExample
AuthorizationCredentials for authenticated requests (Bearer tokens, Basic auth).Bearer eyJhbGci...
AcceptContent types the client can handle.application/json
Accept-EncodingCompression algorithms the client supports.gzip, br
Accept-LanguagePreferred natural languages.en-US,en;q=0.9
Cache-ControlCaching directives for this request.no-cache
ConnectionKeep the connection alive or close it.keep-alive
Content-TypeMedia type of the request body.application/json
Content-LengthSize of the body in bytes.128
CookieCookies previously set by the server.session=abc123
HostDomain name of the server (required in HTTP/1.1).api.example.com
If-None-MatchMakes the request conditional on the ETag changing."abc123"
If-Modified-SinceConditional request based on last modification date.Wed, 21 Oct 2025 07:28:00 GMT
OriginOrigin of a cross-origin request (CORS).https://example.com
RefererURL of the page that led to this request.https://example.com/page
User-AgentString identifying the client software.Mozilla/5.0 ...
X-Forwarded-ForClient IP when behind a proxy/load balancer.203.0.113.45
X-Forwarded-ProtoOriginal protocol (http/https) used by the client.https
X-Api-KeyCommon convention (non-standard) for API key auth.sk_live_...
X-Request-IDCorrelation ID for tracing a request through services.4f9ad8d0

Response headers

HeaderWhat it doesExample
Access-Control-Allow-OriginWhich origins may read the response (CORS).* or https://example.com
AgeHow long the response has been in a cache.3600
Cache-ControlCaching directives for the response.max-age=3600, private
Content-DispositionSuggests a filename / inline vs attachment.attachment; filename="report.pdf"
Content-EncodingCompression applied to the body.gzip
Content-TypeMedia type of the response body.application/json; charset=utf-8
ETagVersion identifier for caching validation."v1.2"
ExpiresDate after which the response is stale.Thu, 01 Jan 2026 00:00:00 GMT
Last-ModifiedDate the resource last changed.Wed, 21 Oct 2025 07:28:00 GMT
LocationRedirect target (used with 3xx) or new resource URI (201).https://api.example.com/users/42
Retry-AfterHow long the client should wait before retrying.30
Set-CookieSets a cookie on the client.session=abc123; HttpOnly; Secure
Strict-Transport-SecurityForces HTTPS for future requests (HSTS).max-age=31536000
VaryWhich request headers affect the cached variant.Accept-Encoding
WWW-AuthenticateAuth scheme required (sent with 401).Bearer realm="api"
X-RateLimit-RemainingCommon convention for API rate limit info.57

Try any header in code

Paste this into the converter to see it in Python, JavaScript, Go and more:

curl https://api.example.com/data \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'X-Request-ID: demo-123'