Classes
HTTP essentials
Verbs, status codes, and why a request/response contract changes how you build.
HTTP is the language of backend work. This class builds the mental model you will use for every service in the program.
The request
POST /api/v1/auth/login HTTP/1.1
Host: learn.bigiverse.com
Content-Type: application/json
Origin: http://localhost:3001
{"email":"ada@example.com","password":"s3cr3t!"}The four parts that matter: the verb, the path, the headers, and the body. Every framework you use is just a nicer way of writing this.
The response
HTTP/1.1 200 OK
Content-Type: application/json
Set-Cookie: bl_session=…; HttpOnly; Path=/; SameSite=Lax
{"data":{"user":{"id":"…"}}}A healthy status-code habit
2xx— it worked.200ordinary,201created,204deleted.4xx— the caller made a mistake. Use400for malformed input,401for missing login,403for doing something you may not,404when something does not exist,409for conflicts,422for validation.5xx— the server made a mistake.503when a dependency is down.
Consistency matters more than cleverness: pick a convention and document it (your API contract is exactly that documentation).
The contract is the product
If your frontend and backend are separate applications, the contract between them — this is your OpenAPI document — is a small product of its own. A typed client generated from the contract turns half your runtime bugs into compile-time errors.