HTTP
Hypertext Transfer Protocol
ActiveApplication-layer protocol for transmitting hypermedia documents, such as HTML. Foundation of the World Wide Web.
Application LayerRFC 91101991IETF Standard
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
Request
http
GET /api/users?limit=10 HTTP/1.1
Host: api.example.com
Accept: application/json
User-Agent: curl/8.4.0Response
http
HTTP/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
linuxbuilt-in
macosbuilt-in
windowsbuilt-in
freebsdbuilt-in
iosbuilt-in
androidbuilt-in