HTTP Protocol: Requests, Responses and Status Codes
HTTP defines request and response semantics for exchanging web resources. The method, target, fields and status describe the application exchange; the transport can vary by HTTP version.
Updated · Editorial approach and simulation limits
A request names an operation and target
An HTTP request includes a method, a request target, fields and sometimes content. GET commonly asks for a representation; POST commonly submits content for processing; other methods express different semantics. The method does not guarantee what an application will do unless the server implements that behavior.
Headers carry metadata about content, negotiation, caching, authentication and connection context. Read the request line or pseudo-fields together with the authority and path. A correct DNS answer and TCP connection do not prove that the request reached the intended virtual host.
Response status and representation are separate
A response status code reports the result at the HTTP layer. A 2xx response does not guarantee that the user’s business operation completed as intended, while 4xx and 5xx responses describe client-side or server-side HTTP outcomes. The response body and application contract supply the remaining detail.
HTTP caching depends on method, status, cache directives, validators and freshness. A cached response can be served without a new origin exchange. When debugging stale content, inspect cache headers and intermediaries before assuming the origin ignored a request.
HTTP semantics outlive one transport version
HTTP/1.1 uses textual message syntax and connection rules; HTTP/2 uses binary frames and multiplexed streams; HTTP/3 maps HTTP semantics onto QUIC. The method, status and much of the field meaning remain HTTP semantics, while framing and transport behavior differ.
A packet capture without TLS decryption may show the TCP or QUIC connection but not the HTTP request content. Protocol Explorer’s HTTP sequence uses example messages to teach their roles; it does not send a request to a website.
Explore HTTP interactively
Follow the matching exchange packet by packet. The animation is a scripted teaching model with illustrative timing, not a capture of your network.
Specification and source
For exact protocol requirements, consult the primary document: RFC 9110: HTTP Semantics. This page summarizes selected behavior and is not a substitute for the specification.
Related protocol lessons
Browse all application protocols · See how HTTP/2 and HTTP/3 use different transports