Module · Backend Engineer
HTTP & Networking
Methods, status codes, caching headers and the browser-facing rules of the wire.
TOPIC 01
Request Lifecycle
What actually happens between the client and your handler.
What you'll practice
- Choose Methods That Are Safe to Retry — guided · beginner
- Map Outcomes to Status Codes — practice · intermediate
A command you'll meet
cat ~/http/api-contract.yamlThe wire protocol is part of your API design. Open the task below for the full walkthrough.
Hands-On Tasks in This Topic (2)
Choose Methods That Are Safe to Retry
A client will retry what it is not sure about, so the method you choose decides whether a retry duplicates an order. Write the contract.
Map Outcomes to Status Codes
The status code is part of the contract - it tells the client whether to retry, to fix its request, or to give up. Write the mapping.
TOPIC 02
Headers & Caching
The headers that decide whether a response is reused, and who may call it at all.
What you'll practice
- Set the Cache Headers — practice · intermediate
- Configure CORS Properly — challenge · advanced
A command you'll meet
cat ~/http/cache-headers.yamlHeaders are how the server talks to every cache in between. Open the task below for the full walkthrough.
Hands-On Tasks in This Topic (2)
Set the Cache Headers
A response with the right cache headers is served without touching your server. Write the policy for the orders API.
Configure CORS Properly
CORS is a browser feature, and the most common way to break it is to answer every origin. Write the configuration that is open where it must be and closed where it must be.