topic
Verified 2026-09-18HTTP Messages
The structure of HTTP requests and responses, including start lines, fields, and content.
Requests contain a method, target, and fields. Responses contain a status code and fields. HTTP/2 and HTTP/3 carry the same semantics in binary frames rather than HTTP/1.1 text syntax.
httpfundamentalsprotocol
Reference (http)
POST /api/users HTTP/1.1
Host: api.example.com
Content-Type: application/json
Content-Length: 15
{"name":"Ada"}Requests contain a method, target, and fields. Responses contain a status code and fields. HTTP/2 and HTTP/3 carry the same semantics in binary frames rather than HTTP/1.1 text syntax.
Common mistakes
- Parsing HTTP by splitting on newlines without respecting framing rules, field limits, or the protocol version.
Sources