http
HTTP methods & messages
How browsers and servers exchange requests and status lines alongside HTML documents.
Common HTTP methods
| Method | Typical use |
|---|---|
| GET | Retrieve a representation; safe & cacheable when semantically appropriate. |
| POST | Submit data or trigger processing with a body. |
| PUT | Replace resource at target URI. |
| PATCH | Partial update. |
| DELETE | Remove resource. |
| HEAD | Same as GET without body—headers only. |
| OPTIONS | Discover allowed methods / CORS preflight. |
Response status families
- 1xx — informational (rare in typical browser navigation).
- 2xx — success (
200 OK,201 Created,204 No Content). - 3xx — redirection (
301,302,303,307,308) — follow Location carefully. - 4xx — client mistakes (
400,401,403,404,429). - 5xx — server failures (
500,502,503).
HTML documents arrive inside HTTP exchanges—cache headers, cookies, and CSP all influence what markup and assets ultimately execute in the browser.