Skip to content
Tech Bits
All articles

How does HTTP work?

HTTP defines how your app asks another system for something and how that system replies. Those messages are called a request and a response.

Alex has signed up, but your app’s list is empty. Your assistant asks you to check the HTTP response. That means looking at the service’s reply for clues.

First, the app sends GET /signups. GET is the method: it asks to retrieve data. POST asks the service to process data you send, such as a new signup. The API defines the exact behaviour.

The reply includes a status code. 200 means the request succeeded; 404 means the requested resource wasn’t found. The reply may also contain the signup list, often as JSON. Extra details called headers describe things such as its format. Reading this reply helps you see where to investigate.

Two app windows exchange an outgoing envelope and a returning envelope.

Ask the service for its signup list.

A fictional signup API. This example runs entirely on this page.

HTTPS adds encryption to protect messages while they travel. The service still needs its own permission checks to decide who can see or change the data.

Sources

Reviewed