HTTP

HTTP is the plain-text conversation behind every web page and API call: a request line and headers from the browser, a status code, headers and a body back from the server.

Load a page

Browser
Server

Message

Press Play to send the first request.

Start line · headers · blank line · body

HTTP is plain text: a request line, headers, a blank line, then an optional body. The response starts with a status code.

Step 1 / 4
Requests
0
Body bytes received
0 B

What's happening?

  1. A request names a method (GET, POST…), a path and headers such as Host and Authorization; POST also sends a body.
  2. The response starts with a status code: 2xx success, 3xx go elsewhere or use your copy, 4xx your request has a problem, 5xx the server does.
  3. Headers like ETag and If-None-Match let a browser skip downloading something it already has (304 Not Modified).

Where you'll meet it

Every API you build or call. Reading status codes and headers is the first step in debugging any web or mobile bug.

Common mistake

Returning 200 with an error message in the body. Clients, caches and monitoring rely on the status code — use 4xx and 5xx properly.

FAQ

What is the difference between 401 and 403?

401: we don't know who you are — sign in. 403: we know who you are, and you are not allowed.

301 or 302?

301 is permanent — browsers and search engines remember the new address. 302 is temporary.

What does 304 save?

The whole body. The browser already has that version, so the server only confirms it is still current.