HTTP & status codes · Lesson 2 of 9 · 3 min read
The five classes, 1xx and 2xx
Classes in ten seconds
| Class | Meaning | Who's at fault (roughly) |
|---|---|---|
| 1xx | Informational — keep going | — |
| 2xx | Success | — |
| 3xx | Redirection — go elsewhere / use cache | — |
| 4xx | Client error — the request is wrong or not allowed | Client (or auth/config) |
| 5xx | Server error — the server or an upstream failed | Server side |
Enlarge diagram
Swipe sideways to see all of it, or tap to open it full screen.
1xx informational
- 100 Continue — the client sent headers with
Expect: 100-continue(common for large uploads); the server says "go ahead, send the body". - 101 Switching Protocols — upgrade accepted, e.g. to WebSocket (
Upgrade: websocket). Proxies and load balancers must support it (ALB does; some proxies need explicit config). - 103 Early Hints — preload hints before the final response.
2xx success
| Code | Meaning | Typical use |
|---|---|---|
| 200 OK | Success with a body | GET, most responses |
| 201 Created | A resource was created | POST create — include Location: /orders/43 and/or the body |
| 202 Accepted | Accepted for asynchronous processing, not done yet | Long jobs: return a job ID/status URL instead of holding the connection |
| 204 No Content | Success, no body | DELETE, PUT/PATCH where nothing needs returning |
| 206 Partial Content | Part of a resource (Range requests) | Video streaming, resumable downloads |
Watch out: "a 200 can still be an error". Some APIs return
200with{"error": "..."}in the body. Monitoring that only counts 5xx misses these failures — use proper status codes in your services, and for third-party APIs monitor payloads or synthetic checks.
Enlarge diagram
Swipe sideways to see all of it, or tap to open it full screen.