HTTP Request Headers

Common HTTP request headers and their purposes.

  • JSON5,763 B
  • YAML4,028 B · −30%
  • TOON3,120 B · −46%

Common HTTP request headers with a description and an example value: Accept, Accept-Language, Accept-Encoding, Authorization, Cache-Control, Content-Type, Cookie, Host and User-Agent, plus Origin, Referer, Range, conditional headers and proxy headers.

Use it when

  • You need the purpose and format of a request header.
  • You are debugging a request in browser developer tools.

Watch out for

  • Some headers can be set only by the browser; scripts cannot set forbidden header names.
  • X-Forwarded-For can be spoofed by clients unless a trusted proxy overwrites it.

The data

HeaderDescriptionExample
AcceptContent types the client can process.application/json, text/html
Accept-LanguagePreferred languages for the response.en-US, en;q=0.9
Accept-EncodingAcceptable content encodings.gzip, deflate, br
AuthorizationCredentials for authentication.Bearer eyJhbGci...
Cache-ControlCaching directives for request and response.no-cache, max-age=3600
Content-TypeMedia type of the request body.application/json; charset=utf-8
Content-LengthSize of the request body in bytes.1234
CookiePreviously set cookies to send back to the server.session_id=abc123
HostDomain name of the server.api.example.com
User-AgentClient application identifier.Mozilla/5.0 ...
X-Request-IDCustom header for request tracing.req-abc123def456
If-None-MatchConditional request using ETag."33a64df551425fcc55e4d42a148795d9f25f89d4"
OriginThe origin (scheme, host, port) that initiated a cross-origin or POST request.https://example.com
RefererThe URL of the page that linked to the resource; the misspelling is historical.https://example.com/page
RangeAsks for only part of a resource, used for resumable downloads and media seeking.bytes=0-1023
If-Modified-SinceConditional request that returns 304 Not Modified if the resource has not changed since the date.Wed, 21 Oct 2015 07:28:00 GMT
If-MatchMakes a request conditional on the resource's ETag matching, used to avoid lost updates."33a64df551425fcc"
X-Forwarded-ForDe facto header listing the originating client IP and proxies a request passed through.203.0.113.5, 198.51.100.7
ForwardedStandardized header (RFC 7239) carrying proxy information such as the client address and protocol.for=203.0.113.5;proto=https
Sec-Fetch-SiteBrowser-set header indicating how the request's origin relates to the target, useful for blocking cross-site requests.same-origin

Fields

The shape of this dataset, read from the data itself: every column, its type and a real value. Agents can use this to plan a query without fetching the whole document.

SectionFieldTypeExample
dataheaderstringAccept
datadescriptionstringContent types the client can process.
dataexamplestringapplication/json, text/html

Fetch the same bytes

The static files contain the same reference rows as the API, with no API rate limit. Live metadata, such as view counts, may differ. Use the API for content negotiation; use the static files for a cacheable snapshot.

curl "https://yjtoon.com/api/dataset/http-request-headers?format=toon"
const res = await fetch(
  "https://yjtoon.com/static-data/dataset/http-request-headers.toon"
);
const toon = await res.text();

Rate limit: 120 requests per minute per IP, no key and no signup. API reference →

Topics

  • web
  • http
  • headers
  • request
  • api

Search the library

Search by a topic, title, or keyword.

Start with a collection

Browse all 205 datasets