NETWORKING / A CONCEPT NOTE
HTTP
the protocol the web speaks
Overview · mechanism
pitfall · examples
01 / THE SHORT VERSION
The idea in a few sentences.
A request-response protocol where your browser sends a method (GET, POST) + path + headers, and the server replies with a status code (200, 404, 500) plus a body. HTTP/2 and 3 add multiplexing and server push on top.
02 / FOLLOW THE MECHANISM
How a request flows
Client
resolves DNS, then opens a TCP connection to the server's IP on port 80 (or 443 for HTTPS).
Client
sends a request line like
GET /api/users HTTP/1.1followed by headers and optionally a body.Server
processes the request and returns a status line like
HTTP/1.1 200 OKwith response headers and body.Client
reads the response; the connection is either kept alive (HTTP/1.1) or reused (HTTP/2) for the next request.
04 / COMMAND NOTES
Read the command, then the result.
Inspect the flags and arguments before trying an example. Snippets can need local setup, replacement values, or resources in your own environment.
fetch just the response headers
curl -I https://supraj.devsee the full request/response exchange
curl -v https://api.example.com05 / CHECK YOURSELF
Could you explain HTTP to a teammate?
Try it out loud in two sentences: what it is, and the one detail that changes the picture. If you stall, the gap is the part to reread.
Up next in NetworkingTCP/IPthe foundation all internet communication rides on