HTTP (Hypertext Transfer Protocol) is the foundation of data exchange on the Web, operating as a request-response protocol between clients (browsers, apps) and servers. Defined in RFC 9110 and preceding standards, HTTP enables communication through methods, status codes, and headers that control how resources are requested, delivered, cached, and secured. Understanding HTTP means understanding how the modern internet works β every API call, webpage load, and data transfer relies on this protocol. A critical distinction: HTTP itself is stateless β each request is independent, requiring mechanisms like cookies or tokens to maintain state across interactions.
What This Cheat Sheet Covers
This topic spans 23 focused tables and 191 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Request Methods
| Method | Example | Description |
|---|---|---|
GET /users/123 | β’ Retrieves a resource from the server β’ safe and idempotent β multiple identical requests produce the same result. | |
POST /users{"name": "Alice"} | β’ Submits data to create a new resource β’ not idempotent β repeated calls may create multiple resources. | |
PUT /users/123{"name": "Bob"} | β’ Replaces the entire resource at the specified URI β’ idempotent β repeated calls have the same effect. | |
PATCH /users/123{"name": "Charlie"} | β’ Partially updates a resource without replacing it entirely β’ not guaranteed idempotent but often implemented as such. | |
DELETE /users/123 | β’ Removes the specified resource β’ idempotent β deleting the same resource multiple times has the same effect. |