# HTTP Response

> The message a server sends back. It has a code and the thing you asked for.

**Field:** Infrastructure  
**Category:** Networking  
**Also known as:** Response, Web Response

## Think of it like

Think of it like the plate that comes back from the kitchen. A note on it says all went well.

## Definition

An HTTP response is the message a server sends back after a request. Its first line holds a status code, like 200 for OK or 404 for not found. Then come headers, such as what kind of file it is and how long to keep it. Last comes the body, which is the page, the picture or the data that was asked for. The browser reads the code first to know what happened.

## Example

Emma's server answers with 200 OK. A header says the file is HTML, and then the menu page follows.

## Example code

```http
HTTP/1.1 200 OK
Content-Type: text/html

<h1>Menu</h1>
```

All went well. Here is an HTML page with a heading.

## Why it matters

The response tells you if a request worked and why not. It is the first place to look when a page breaks.

## Common mistake

Sending back 200 OK with an error message in the body. Tools and apps then think it worked.

## Three principles

- **Status code first.** Says what happened.
- **Headers.** File type, caching and more.
- **Body.** The content that was asked for.

## Related terms

- [HyperText Transfer Protocol (HTTP)](https://learn.benibix.com/term/infrastructure/http)
- [HTTP Request](https://learn.benibix.com/term/infrastructure/http-request)
- [HTTP Status Code](https://learn.benibix.com/term/infrastructure/http-status-code)
- [HyperText Markup Language (HTML)](https://learn.benibix.com/term/development/html)
- [Response Body](https://learn.benibix.com/term/development/response-body)

## Taught in

- [HTTP Requests and Responses](https://learn.benibix.com/learn/infrastructure-networking/http-requests-and-responses): Computer Networking, 9/13

---

Source: https://learn.benibix.com/term/infrastructure/http-response
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-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
