← HTTP & APIs

Software Knowledge → 03 · HTTP & APIs → Response

PART III · HTTP & APIs

Response

The message returned after a request has been processed.

01 · What is it?

What is it?

A response is the message a server or API returns after processing a request.

It may contain data, a status, or an error.

Simple Definition: A response tells the client what happened.

02 · Think of it like...

Think of it like...

Think of a request as a question.

The response is the answer.

Client→Request→Server→Response→Client
03 · What does it do?

What does it do?

A response can:

Return Data
Confirm Success
Return a Status Code
Explain an Error
Return Metadata
04 · Where is it used?

Where is it used?

Responses are used between:

Server and Browser
Backend and Frontend
API and Mobile App
Service and Service
External API and Internal System
05 · Example

Example

Request:

GET /api/orders/1001

Response:

HTTP/1.1 200 OK

{
  "id": 1001,
  "status": "Completed"
}

The status code describes the result.
The body contains the returned data.

06 · How it connects

How it connects

Request
→
Backend Processing
→
Response

Status Code → Response Body → Client

The response completes the request-response cycle.

07 · Do Not Confuse

Do Not Confuse

Response ≠ Request

Request

Asks for something.

Response

Returns the result.

Request = Ask
Response = Answer
08 · Topic Glossary

Topic Glossary

ENGLISH TERM中文SIMPLE ENGLISH中文小白理解
Response响应The message returned after a request is processed.请求处理完成后返回的数据或结果。
Request请求A message asking for data or an action.向系统请求数据或执行操作的信息。
Status Code状态码A number showing the result of an HTTP request.表示 HTTP 请求处理结果的数字。
Response Body响应体The main data returned inside a response.响应中真正返回的主要数据内容。
Response Header响应头Extra information returned with the response.随响应一起返回的附加信息。
Success成功A result showing the request was processed successfully.表示请求已成功处理的结果。
Error错误A result showing something went wrong.表示请求处理过程中出现问题的结果。
JSONJSON 数据格式A common format used for response data.API 响应中常用的结构化数据格式。
Client客户端The side receiving the response.接收响应结果的一端。
Server服务器The side processing the request and sending the response.处理请求并返回响应的一端。
09 · What to Remember

What to Remember

A response is returned after a request.

Responses may contain data, status information, or errors.

The request and response together form one interaction.

Request→Processing→Response
↑