HTTP Response

HTTP Response

An HTTP response is a message sent by a server after receiving an HTTP request.

It tells the client whether the request succeeded and may include headers, status information, and returned content.

How Does an HTTP Response Work?

A typical flow looks like this:

  1. The client sends an HTTP request.
  2. The server processes it.
  3. The server returns an HTTP response.
  4. The client reads the status, headers, and body.

Main Parts of an HTTP Response

An HTTP response usually contains:

  • Status code: Indicates the result.
  • Headers: Provide metadata.
  • Body: Contains the returned content.

For example:

HTTP/1.1 200 OK
Content-Type: application/json

with a body such as:

{
  "name": "Wireless Mouse",
  "price": 29.99
}
Join SwiftProxy Discord community Chat with SwiftProxy support via WhatsApp Chat with SwiftProxy support via Telegram
Chat with SwiftProxy support via Email