Theo's Corner
dev / irl / thoughts
← Back
tech

How to read an HTTP request — headers, body, methods

Theo|Jul 2026|~4 min read

HTTP is the protocol the web runs on. Every time you load a page, call an API, or submit a form, you're making HTTP requests. Understanding what's actually in them makes building and debugging web things significantly easier.

The structure of a request

An HTTP request has three parts: the request line, headers, and optionally a body.

POST /api/users HTTP/1.1
Host: api.example.com
Content-Type: application/json
Authorization: Bearer eyJhbGc...
Content-Length: 42

{"name": "Theo", "email": "me@example.com"}

Methods

The method tells the server what you want to do:

REST APIs are built around these methods. GET /users returns a list. POST /users creates one. GET /users/123 returns a specific one. DELETE /users/123 removes it. The method tells you the intent, the path tells you the target.

Headers

Headers are key-value pairs that provide metadata about the request. The important ones:

Status codes in responses

Responses come back with a status code that tells you what happened:

Seeing real requests

Open browser dev tools, go to the Network tab, and reload a page. Every HTTP request the page makes is listed there — click one to see the full headers, body, and response. This is the fastest way to understand what's actually happening between a browser and a server.