HTTP & APIs
Read and make HTTP requests, interpret responses, and call or serve a simple JSON API from Python (or JavaScript/TypeScript).
5 objectives 6 steps about 115 min
Learn it step by step
Read the lessons in order, try the practice checks, then prove the skill with the knowledge check.
This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.
Learning objectives
- Identify the parts of an HTTP request and response (method, URL, headers, body, status) and inspect them with curl or browser developer tools.
- Choose the HTTP method for an operation and interpret status code classes, stating which methods are safe and which are idempotent.
- Call a JSON API from code (Python with httpx in the reference stack, or JavaScript/TypeScript with fetch) with query parameters, headers, a bearer token and a timeout, handling 4xx and 5xx responses explicitly.
- Serve a minimal JSON endpoint locally (a FastAPI route in the reference stack, or a Node or Next.js route handler) and verify its status, headers and body with curl.
- Explain what HTTPS adds to an exchange (encryption, integrity and server authentication by certificate), how HTTP/1.1, HTTP/2 and HTTP/3 differ in connection use, and how Accept and Content-Type negotiate a representation.
Lesson plan
6 steps, about 115 min · 5 of 5 lessons available so far
- What Travels Over the Wire: Requests, Responses and HTTPS Concept · 20 min
- Methods, Status Codes and Idempotency Concept · 20 min
- Lab: Inspecting Traffic with curl and DevTools Lab · 20 min
- Calling a Public JSON API from Python or TypeScript Worked example · 25 min
- Lab: Your First JSON Endpoint Lab · 20 min
- Check: Read the Exchange, Predict the Outcome Knowledge check · 10 questions
Practise it
Write a Python script that queries a public JSON API with httpx (query parameters, timeout, one retry on 503, certificate verification left on), records the negotiated HTTP version, keeps selected fields, and exposes them through a one-route local endpoint that you verify with curl -i. Learners on a JavaScript stack do the same with fetch and a Node or Next.js route handler.
Build it from scratch
Practice builds that exercise this skill by re-creating a real technology.
- Build your own Web ServerIntermediate · 8–16 h
- Build your own Web FrameworkIntermediate · 8–15 h
- Build your own Load BalancerIntermediate · 6–12 h
- Build your own BlockchainIntermediate · 8–16 h
- Build your own Web BrowserAdvanced · 30–60 h
- Build your own AI Chat BotIntermediate · 6–12 h
References
Hard prerequisites
Unlocks
On these roadmaps
Progress and evidence for this skill are shared across all of them.