COMPUTER ENGINEER

Blog
HTTP / HTTPS / TLS6 min study
04/ 70

Web and protocol foundations

Anatomy of requests and responses

Start line, headers and body.

UnderstandStudy an examplePractise

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.

WHEN TO USE IT

Read messages independently of a framework.

COMMON PITFALL

Treating HTTP/2 as literal HTTP/1.1 text lines.

01 / PRACTICE

One topic. Three levels of depth.

HTTP / illustrative example
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.

02 / YOUR TURN

Try it yourself first.

Does a changed reason phrase change status semantics?

Show the solution and explanation
Worked solution
Status code: 200

No; use the numeric status code for automation.