How HTTP Works

The HTTP reference

The HTTP reference you keep open in a tab.

Every status code, header, method and cookie attribute — with the spec behind it, the gotchas that bite in production, and the fix. Plus tools to check your own responses.

Look up a status code, header or error…
zsh — every token is a link
$ curl -v https://api.example.com/v1/orders/42
> GET /v1/orders/42 HTTP/2
> host: api.example.com
> authorization: Bearer eyJhbGciOi…
> accept: application/json
> if-none-match: "33a64df5"
>
< HTTP/2 200
< content-type: application/json; charset=utf-8
< cache-control: private, max-age=60
< etag: "8c1f02b7"
< vary: Accept-Encoding
< set-cookie: sid=…; Secure; HttpOnly; SameSite=Lax
< strict-transport-security: max-age=63072000
> sent by the client · < received from the server

Status codes

Every code, one screen

Full status code reference →

Headers

90 →

Methods

10 →

Cookies

9 →

Something’s broken

Paste the error. Get the fix.

All debug guides →

Tools

Check your own responses

All tools →

Guides

18 →
  1. 01API Rate Limiting: Algorithms, Headers and 429Rate limit an HTTP API: fixed window, sliding window, token bucket and leaky bucket compared, plus 429, Retry-After, RateLimit headers, nginx and Express.
  2. 02Content Negotiation: Accept, Languages and CachesImplement HTTP content negotiation with Accept headers, q-values, Vary and 406 responses, with Express, Django and nginx examples and language SEO guidance.
  3. 03Cookie Security: HttpOnly, SameSite, and Secure FlagsA comprehensive guide to understanding and implementing secure HTTP cookies to protect against XSS, CSRF, and session hijacking attacks.
  4. 04Cross-Origin Resource Sharing (CORS)Master Cross-Origin Resource Sharing (CORS) for secure cross-origin HTTP requests. Learn preflight requests, headers, credentials, and common error solutions.
Browse /search