Every web API runs on HTTP, so understanding HTTP is the foundation of API testing. At its core, HTTP is a simple request–response conversation: a client sends a request to a server, and the server sends back a response.
The HTTP request/response cycle
Client sends request
→
Server processes
→
Response status + body
Parts of a request
- Method — the action (GET, POST, PUT, DELETE).
- URL — the endpoint being called.
- Headers — metadata like content type and authentication.
- Body — data sent with the request (often JSON).
Parts of a response
- Status code — the outcome (e.g. 200, 404).
- Headers — metadata about the response.
- Body — the returned data.
Why it matters: every API test you write asserts on these parts — the status code, the headers, and the body. Master this model and the rest of API testing clicks into place.
Conclusion
HTTP is a straightforward request–response exchange, and its building blocks — method, URL, headers, body, and status code — are exactly what API tests examine. With this model clear, you are ready to explore the methods themselves.