# Response Body

> The data a server sends back in a web reply, after the headers. It is what you asked for.

**Field:** Software Development  
**Category:** APIs  
**Also known as:** HTTP Response Body, Response Payload, Response Content

## Think of it like

It is like the gift in a box. The label is on the outside, and the gift is inside.

## Definition

The response body is the data a server sends back after the headers in a web reply. It is the thing you asked for: a web page, a picture, or data such as JSON. A header called Content-Type says what format it is in. A blank line separates the headers from the body. Some replies have no body at all, like a 204 No Content reply or the answer to a HEAD request.

## Example

Emma's app asks an API for user 42. The response body holds that user as JSON, with a name of Lucy.

## Example code

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

{"id": 42, "name": "Lucy"}
```

The status line, one header, a blank line, then the JSON body.

## Why it matters

It is the part of a reply your code reads. Every API call ends with code that unpacks this body.

## Common mistake

Reading the body before checking the status code. An error reply has a body too, and it is not the data you wanted.

## Three principles

- **After the headers.** Past a blank line.
- **What you asked for.** A page, a file or data.
- **Typed by a header.** Content-Type says the format.

## Related terms

- [Request Body](https://learn.benibix.com/term/infrastructure/request-body)
- [HTTP Response](https://learn.benibix.com/term/infrastructure/http-response)
- [HTTP Status Code](https://learn.benibix.com/term/infrastructure/http-status-code)
- [JavaScript Object Notation (JSON)](https://learn.benibix.com/term/development/json)
- [Application Programming Interface (API)](https://learn.benibix.com/term/development/api)
- [API Error Response](https://learn.benibix.com/term/development/error-response)

![An HTTP response in four parts, top to bottom. The status line, HTTP/1.1 200 OK. The headers, such as Content-Type: application/json. A blank line. Then the body, marked in the accent colour, holding the JSON data: an id of 42 and a name of Lucy.](https://learn.benibix.com/diagrams/dev5-response-body.svg)

---

Source: https://learn.benibix.com/term/development/response-body
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
