
The request-response model
HTTP is a stateless, client-server protocol. A client sends a request; a server responds. Each request is independent — no server memory without cookies or sessions.
HTTP methods
- GET — retrieve a resource without side effects.
- POST — submit data to create or trigger a server action.
- PUT — replace a resource entirely.
- PATCH — partially update a resource.
- DELETE — remove a resource.
Status codes
Every response carries a 3-digit code: 2xx success, 3xx redirect, 4xx client error (404 Not Found), 5xx server error (500 Internal Server Error).
HTTPS and TLS
HTTPS is HTTP secured with TLS. TLS encrypts the connection using asymmetric cryptography to establish a shared secret, then AES-GCM for data encryption.
HTTP versions
HTTP/1.1 (1997): persistent connections. HTTP/2 (2015): multiplexing. HTTP/3 (2022): QUIC over UDP, eliminating TCP head-of-line blocking.