api: YAML JSON TOON Database version: 1.0.0 format: toon dataset: id: 2817 slug: http-request-headers title: HTTP Request Headers description: Common HTTP request headers and their purposes. summary: "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_when[2]: You need the purpose and format of a request header.,You are debugging a request in browser developer tools. caveats[2]: 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. related[4]: http-response-headers,http-content-negotiation,http-authentication-methods,http-cors-guide entry_count: 20 fields[3]{section,field,type,example}: data,header,string,Accept data,description,string,Content types the client can process. data,example,string,"application/json, text/html" category: Web Technologies category_slug: web-technologies tags: "web,http,headers,request,api" view_count: 41 created_at: 1793403093 updated_at: 1793403093 data[20]{header,description,example}: Accept,Content types the client can process.,"application/json, text/html" Accept-Language,Preferred languages for the response.,"en-US, en;q=0.9" Accept-Encoding,Acceptable content encodings.,"gzip, deflate, br" Authorization,Credentials for authentication.,Bearer eyJhbGci... Cache-Control,Caching directives for request and response.,"no-cache, max-age=3600" Content-Type,Media type of the request body.,application/json; charset=utf-8 Content-Length,Size of the request body in bytes.,"1234" Cookie,Previously set cookies to send back to the server.,session_id=abc123 Host,Domain name of the server.,api.example.com User-Agent,Client application identifier.,Mozilla/5.0 ... X-Request-ID,Custom header for request tracing.,req-abc123def456 If-None-Match,Conditional request using ETag.,"\"33a64df551425fcc55e4d42a148795d9f25f89d4\"" Origin,"The origin (scheme, host, port) that initiated a cross-origin or POST request.","https://example.com" Referer,The URL of the page that linked to the resource; the misspelling is historical.,"https://example.com/page" Range,"Asks for only part of a resource, used for resumable downloads and media seeking.",bytes=0-1023 If-Modified-Since,Conditional request that returns 304 Not Modified if the resource has not changed since the date.,"Wed, 21 Oct 2015 07:28:00 GMT" If-Match,"Makes a request conditional on the resource's ETag matching, used to avoid lost updates.","\"33a64df551425fcc\"" X-Forwarded-For,De facto header listing the originating client IP and proxies a request passed through.,"203.0.113.5, 198.51.100.7" Forwarded,Standardized header (RFC 7239) carrying proxy information such as the client address and protocol.,for=203.0.113.5;proto=https Sec-Fetch-Site,"Browser-set header indicating how the request's origin relates to the target, useful for blocking cross-site requests.",same-origin