STAGE 01 / LESSON 03
HTTP requests and responses
HTTP defines how a client asks for a resource and how the server responds.
THE IDEA
Understand it.
A request includes a method, a target and headers; some requests also have a body. GET normally asks to read a resource, while POST is commonly used to submit data. The application defines what a particular endpoint does.
A response has a status and headers, and it can include a body. For example, 200 indicates a successful request, 404 indicates a missing resource, and 500 indicates a server error. Headers can describe the content type or caching behavior.
SEE IT IN CONTEXT
A simple HTTP exchange
GET /roadmap HTTP/1.1
Host: www.imkodirov.com
HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
<html>…</html>This is illustrative HTTP/1.1 text; your browser may use HTTP/2 or HTTP/3 and show a different wire representation.
LEARN FROM REAL WEBSITES
See it in the real world.
These simplified structures come from public sources. Company systems change, and the sources may describe only one project or an earlier design.
GitHub
Documentation checked November 2026Request a resource
GitHub's REST guide demonstrates requests to API endpoints and the responses a client receives.
- Client request
- HTTP method + URL
- GitHub API
- Status + response body
What to learn: The method, endpoint and response status are part of the HTTP contract; the API is one public part of GitHub.
Read the source: GitHub REST API guideSpotify
Documentation checked November 2026Call the Web API
Spotify documents HTTPS requests to its Web API and JSON responses for supported resources.
- Application
- HTTPS API request
- Spotify Web API
- JSON response
What to learn: Compare a request and its response with GitHub's: the same HTTP concepts apply even though the resources differ.
Read the source: Spotify Web API callsTRY IT YOURSELF
Practice.
In the Network panel, reload this page and open its document request. Find the request method, status code, and Content-Type response header.
Show one possible answer
The document request will typically use GET. Its response status is shown separately from response headers; the Content-Type describes the returned representation.
GO DEEPER