HTTP Request Headers

Common HTTP request headers and their purposes.

The data

0

Header
Accept
Description
Content types the client can process.
Example
application/json, text/html

1

Header
Accept-Language
Description
Preferred languages for the response.
Example
en-US, en;q=0.9

2

Header
Accept-Encoding
Description
Acceptable content encodings.
Example
gzip, deflate, br

3

Header
Authorization
Description
Credentials for authentication.
Example
Bearer eyJhbGci...

4

Header
Cache-Control
Description
Caching directives for request and response.
Example
no-cache, max-age=3600

5

Header
Content-Type
Description
Media type of the request body.
Example
application/json; charset=utf-8

6

Header
Content-Length
Description
Size of the request body in bytes.
Example
1234

7

Header
Cookie
Description
Previously set cookies to send back to the server.
Example
session_id=abc123

8

Header
Host
Description
Domain name of the server.
Example
api.example.com

9

Header
User-Agent
Description
Client application identifier.
Example
Mozilla/5.0 ...

10

Header
X-Request-ID
Description
Custom header for request tracing.
Example
req-abc123def456

11

Header
If-None-Match
Description
Conditional request using ETag.
Example
"33a64df551425fcc55e4d42a148795d9f25f89d4"

Fetch the same bytes

The static files are identical to what the API returns, but with no rate limit and no server round trip. Use the API when you want a query and a content type; use the files when you want to cache one document.

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