GET
Read a resource. Should not change server state, and is safe to retry or cache.
Lesson 1 of 10
Every API request a customer sends is an HTTP request. Before you can diagnose why one failed, you need to be fluent in the shape of the protocol itself.
A client sends a request; a server sends back a response. That's the whole protocol — everything else is detail on top of this.
A request has a method (what you want to do), a path (what you want to do it to), headers (metadata like auth and content type), and sometimes a body(the data you're sending). A response has a status code (what happened), its own headers, and usually a body describing the result or the error.
The method tells the server what kind of operation the client intends.
Read a resource. Should not change server state, and is safe to retry or cache.
Create a resource or trigger an action that usually has side effects.
Replace a resource entirely with the payload sent.
Apply a partial update to a resource — only the fields included change.
Remove a resource.
You don't need to memorize every code — just the family, and a handful of specific ones you'll see constantly.
The request was received, understood and accepted — e.g. 200 OK, 201 Created, 204 No Content.
Further action is needed to complete the request — e.g. 301 Moved Permanently, 304 Not Modified.
Something about the request itself is wrong — e.g. 400 Bad Request, 401 Unauthorized, 404 Not Found.
The request was valid, but the server failed while handling it — e.g. 500 Internal Server Error, 503 Service Unavailable.
Look at the sanitized request and response below, then work through both exercises.
POST /v1/messages HTTP/1.1
Authorization: Bearer <redacted>
Content-Type: application/json
{
"to": "+15551234567",
"body": "Your appointment is confirmed."
}
HTTP/1.1 400 Bad Request
{
"error": {
"code": "invalid_recipient",
"message": "The 'to' field is not a valid phone number"
}
}Answer in your head first, then click a question to reveal the answer.
Work through the sample request/response and check each item off. Progress is saved in your browser.
These primers are a starting point. Read the primary sources to build real fluency.
What building this project taught me.
The definitions on this page are intentionally short. The goal is enough context to make the MDN pages make sense on a first read, not to replace them.
The concept check is throwaway state (useState) since answers aren't meant to be tracked. The scenario checklist reuses the localStorage + useSyncExternalStore pattern from the onboard page's DiagnosticChecklist, under its own storage key prefix so the two don't collide.