How to work through this subject
An order that works, not a checklist. Nothing here is tracked — the steps sequence this subject’s own topics and add none.
- Take one URL apart into scheme, hostname, port and path, and say what each part decides.
- Send the same request with a tool that shows you headers and body, and read the raw response.
- Try each HTTP method against something safe and note which ones are meant to change state.
- Read a handful of status codes and sort them into 'caller was wrong' and 'we were wrong'.
- Send JSON as a request body and read JSON back, noticing that both are just text with a content type.
- Finish by drawing the full path of one request — client, DNS, port, route, application logic, database, response — and narrating it end to end.
What to watch for
- Status codes are a contract. 4xx means the caller was wrong; 5xx means you were.
- Statelessness is why authentication has to be re-established on every request.
- Headers carry metadata about the message; the body carries the message. Putting one in the other is a common design mistake.
- REST conventions are conventions, not rules enforced by anything. Their value is that callers can guess correctly.
- JSON is text. Nothing about it is typed until your code decides what the text means.
- DNS turns a name into an address before any request is sent. When something is unreachable, that is the first hop to check.
Curriculum topics
- client/server
- The two roles in a network exchange: one asks, the other answers.
- hostname
- The name of the machine you are connecting to, resolved to an address before the connection.
- port
- A number identifying which program on a machine a connection is for, so one machine can run many servers.
- DNS intuition
- The system that turns a domain name into an IP address.
- HTTP methods
- The verb of a request — GET, POST, PUT, DELETE — declaring what kind of action is intended.
- URL
- The full address of a resource, including scheme, host, path and query string.
- headers
- Metadata sent alongside a request or response — content type, authentication, caching.
- body
- The payload of a request or response, as opposed to its metadata.
- JSON
- A text format for nested data that preserves types and structure, unlike CSV.
- request
- What the client sends: a method, a URL, headers and optionally a body.
- response
- What the server sends back: a status code, headers and optionally a body.
- status code
- The three-digit result of a request. 2xx succeeded, 4xx means the caller was wrong, 5xx means the server was.
- statelessness
- HTTP remembers nothing between requests, so identity must be re-established on every one.
- REST conventions
- A common style for API design: resources as URLs, HTTP methods as the actions on them.
Resources for this subject
- REFERENCEHTTP MDN Web Docs
The practical reference for methods, status codes and headers. The source's framework rule is to learn HTTP before framework magic — this is that material.Open
Need another explanation?1 more reference
- OPTIONALRFC 9110 — HTTP Semantics IETF
The specification itself. Consult for a precise answer on method semantics or idempotency; do not read end to end.Open
A reviewer should be able to answer these
Answer from memory, out loud, before moving on. These are not tracked and do not affect the gate — they tell you whether you actually understand this subject.
- What does 'HTTP is stateless' mean for how you authenticate a user?
- What is the difference between a 400 and a 500, and who is responsible for each?
- When would you use PUT instead of POST?
- What is the difference between a header and the body, and what belongs in each?
- What does the client actually send when it requests a URL?
- What do the parts of a URL each determine about where the request goes?
- What does DNS resolve, and what happens if it resolves to the wrong address?
- Which HTTP methods are expected to be safe to repeat, and why does that expectation matter?