Skip to main content
apiguide.dev

HTTP Headers Directory

A comprehensive reference of HTTP headers commonly utilized in web APIs to manage authentication, pagination, rate limiting, and content negotiation.

Request Headers

Accept

requestRFC Std

Specifies the media types that the client is willing to receive in the response.

Accept-Encoding

requestRFC Std

Declares what compression algorithms the client supports for the response payload.

Accept-Language

requestRFC Std

Advertises the natural languages the client prefers for the response.

Sent by the browser in a CORS preflight to announce the custom headers of the actual request.

Sent by the browser in a CORS preflight to announce the method of the actual request.

Authorization

requestRFC Std

Contains the credentials to authenticate the client with the server.

View reference →Codes: 401,403

Cookie

requestRFC Std

Sends previously stored cookies from the client back to the server.

Expect

requestRFC Std

Signals that the client expects a particular server behavior before continuing the request.

View reference →Codes: 100,417

Host

requestRFC Std

Specifies the target host and port of the resource being requested.

View reference →Codes: 400,421

Idempotency-Key

requestCustom

Custom request header used to prevent duplicate operations (mutations) on the server.

If-Match

requestRFC Std

Makes the request conditional; execution occurs only if the client ETag matches the server ETag.

View reference →Codes: 412,428

If-Modified-Since

requestRFC Std

Makes the request conditional; execution occurs only if the resource has changed since the given date.

If-None-Match

requestRFC Std

Makes the request conditional; execution occurs only if the client ETag does not match the server ETag.

View reference →Codes: 304,412

Origin

requestRFC Std

Indicates the origin (scheme, host, and port) that a cross-origin request comes from.

Prefer

requestRFC Std

Lets the client request optional, non-critical handling behaviors from the server.

View reference →Codes: 200,202

Range

requestRFC Std

Requests only part of a resource by specifying one or more byte ranges.

View reference →Codes: 206,416,200

Response Headers

Accept-Ranges

responseRFC Std

Advertises whether a server supports range requests for a resource.

Indicates whether the response can be exposed when the CORS request includes credentials.

Lists the request headers that are permitted during the actual CORS request.

Lists the HTTP methods permitted when accessing a resource in response to a CORS preflight.

Specifies which origin(s) are permitted to read the response in a CORS request.

View reference →Codes: 200,204

Lists the response headers that browsers are allowed to expose to client-side JavaScript.

Access-Control-Max-Age

responseRFC Std

Specifies how long the results of a CORS preflight request can be cached by the browser.

Age

responseRFC Std

The time in seconds since a cached response was generated at the origin server.

Allow

responseRFC Std

Lists the HTTP methods supported by the target resource, on a 405 Method Not Allowed or a 2xx OPTIONS response.

Content-Disposition

responseRFC Std

Indicates whether the body should be displayed inline or treated as a downloadable attachment.

Content-Range

responseRFC Std

Indicates which portion of a resource is delivered in a partial response.

View reference →Codes: 206,416

Deprecation

responseRFC Std

Signals that an endpoint or resource is deprecated and may be removed in future.

ETag

responseRFC Std

An identifier for a specific version of a resource, used for cache validation.

View reference →Codes: 200,304,412

Expires

responseRFC Std

The absolute date and time after which a cached response is considered stale.

Last-Modified

responseRFC Std

The date and time a resource was last changed, used for cache validation.

View reference →Codes: 200,304,412

Location

responseRFC Std

Indicates the URL to redirect the client to, or the URL of a newly created resource.

View reference →Codes: 201,301,302,303,307,308

RateLimit-Limit

responseCustom

Indicates the maximum number of requests the client is permitted to make in the current rate window.

RateLimit-Remaining

responseCustom

Indicates the remaining number of requests the client is allowed to make in the current rate window.

RateLimit-Reset

responseCustom

Indicates the number of seconds remaining until the current rate window resets.

Retry-After

responseRFC Std

Tells the client how long to wait before making a follow-up request.

View reference →Codes: 429,503

Set-Cookie

responseRFC Std

Instructs the client to store a cookie and return it on subsequent requests.

Sunset

responseRFC Std

The date after which a resource is expected to become unavailable.

Vary

responseRFC Std

Lists the request headers a response depends on, controlling cache key selection.

View reference →Codes: 200,304

WWW-Authenticate

responseRFC Std

Defines the authentication method that should be used to gain access to the resource.

Bidirectional Headers (Request & Response)

Cache-Control

bothRFC Std

Directives for caching mechanisms in both requests and responses.

View reference →Codes: 200,304

Content-Encoding

bothRFC Std

Indicates the compression encoding that has been applied to the message body.

Content-Language

bothRFC Std

Describes the natural language(s) of the intended audience for the message body.

Content-Length

bothRFC Std

Indicates the size of the request or response body in bytes.

View reference →Codes: 411,413

Content-Type

bothRFC Std

Indicates the media type of the request or response body payload.

Link

bothRFC Std

Provides a means to serialize relationships between resources in HTTP headers, commonly used for pagination.

View reference →Codes: 103,200,206