Web and protocol foundations
Anatomy of requests and responses
Start line, headers and body.
Understand the concept
An HTTP/1.1 request line contains method, target and version. A response carries a status code; application logic should not depend on the reason phrase. A blank line separates fields from the body, which may be JSON, HTML or binary data.
HTTP/2 and HTTP/3 preserve these concepts through binary framing; the readable examples are not their literal wire formats. Header names are case-insensitive, while values follow field-specific rules. Repeated fields cannot always be combined identically; Set-Cookie is an important exception.
Intermediaries may transform messages. Understanding framing, length and compression helps diagnose incomplete bodies.
Read messages independently of a framework.
Treating HTTP/2 as literal HTTP/1.1 text lines.
One topic. Three levels of depth.
GET /hello HTTP/1.1
Host: example.test
A blank line ends the header section.
This page does not send requests to external servers. Messages are readable HTTP/1.1 illustrations, not HTTP/2 or HTTP/3 wire dumps. example.test is reserved for examples. Run commands and JavaScript only in your own test environment; never publish real tokens or cookies.
Try it yourself first.
Does a changed reason phrase change status semantics?
Show the solution and explanation
Status code: 200No; use the numeric status code for automation.