Hypertext Transfer Protocol
ActiveApplication-layer protocol for transmitting hypermedia documents, such as HTML. Foundation of the World Wide Web.
In one line
HTTP is the foundation of data communication on the Web, defining how clients (browsers, apps) request resources and servers respond. Standardized in RFC 9110, it operates over TCP (HTTP/1.1, HTTP/2) or QUIC (HTTP/3) and uses a request-response model with methods, headers, and status codes.
Key Characteristics
Request-Response
Client sends request, server returns response. Stateless by default.
Text-based (HTTP/1.x)
Human-readable headers and messages in HTTP/1.x. Binary framing in HTTP/2+.
Extensible
Headers, methods, and status codes can be extended without protocol changes.
Cacheable
Responses can be cached by intermediaries and clients for performance.
Message Format
GET /api/users?limit=10 HTTP/1.1
Host: api.example.com
Accept: application/json
User-Agent: curl/8.4.0HTTP/1.1 200 OK
Date: Tue, 12 Dec 2023 10:00:00 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 1234
[Response body]Implementations
Common Methods
View all methods →HTTP methods define the desired action to be performed on a resource.
Caching
HTTP caching reduces latency and bandwidth usage.
- • Cache-Control
- • ETag / If-None-Match
- • Last-Modified / If-Modified-Since
- • Vary
Security
Security is critical when using HTTP over the public internet.
- • HTTPS (TLS)
- • HSTS
- • CORS
- • Security Headers
History
HTTP was created by Tim Berners-Lee in 1991 to enable the World Wide Web.
- • 1991: HTTP/0.9
- • 1996: HTTP/1.0
- • 1997: HTTP/1.1
- • 2015: HTTP/2
- • 2022: HTTP/3