HTTP — how computers talk
The request/response protocol of the web
⏱ Est. ~4 min
01 · Read
When your browser (the client) talks to a server, they use a protocol called HTTP (HyperText Transfer Protocol). It's a simple back-and-forth conversation:
1. Your browser sends a request: "I want this page" or "here's some data to save" 2. The server sends a response: "here's the page," "got it, saved," or "sorry, can't find it"
Every interaction on the web follows this pattern. Every page load, every form submission, every image that appears — it's all HTTP requests and responses going back and forth.
💡 Picture thisHTTP is like sending letters. You write a letter (request) stating your action — "please send me your catalog" or "here is my order form." The company writes a letter back (response), giving you what you asked for, or attaching a note saying they can't help. Each letter follows a fixed format both sides understand.
Key points
- HTTP = HyperText Transfer Protocol, the common language of the web
- Every web interaction is a request from the client + a response from the server
- Requests include a method that says what you want to do
- Responses include a status code that says what happened
02 · Code example
HTTP has different methods for different actions. Here are the four most common.
GET — read data
GET /api/users
"Give me the list of users."
Used when: loading a page, viewing a profile, searching
POST — create data
POST /api/users
"Here's a new user to add."
Used when: signing up, submitting a form, posting a comment
PUT — update data
PUT /api/users/42
"Update user #42 with this new info."
Used when: editing your profile, changing settings
DELETE — delete data
DELETE /api/users/42
"Remove user #42."
Used when: deleting your account, removing a post
Think of it as CRUD: Create (POST), Read (GET), Update (PUT), Delete (DELETE). These four operations cover almost everything you do on the web.
03 · Match
Match each HTTP status code to what it means. You've probably seen a few of these before!
(This section is interactive — please enable JavaScript.)
04 · Quiz
When you submit a signup form on a website, which HTTP method is your browser most likely using?
Other lessons in this chapter
⚠ The full interactive experience needs JavaScript. Please enable it and reload.
※ This is an independent Traditional Chinese teaching project — not an official Anthropic product. Claude™ is a trademark of Anthropic, PBC.