HTTP Methods
GET, POST, PUT, PATCH, DELETE — when and why to use each
Knowledge Debt detected
You can study this freely — but your score may plateau if these foundations have gaps. The Mastery badge requires them to be solid.
Explanation
HTTP methods (verbs) indicate the action to perform:
| Method | Purpose | Has Body? | Idempotent? | |--------|---------|-----------|-------------| | GET | Retrieve data | No | Yes | | POST | Create resource | Yes | No | | PUT | Replace resource | Yes | Yes | | PATCH | Update part of resource | Yes | No | | DELETE | Delete resource | No | Yes |
Idempotent means calling it multiple times has the same effect as calling it once.
In REST APIs, you combine method + path to describe actions: - GET /users → list all users - POST /users → create a user - GET /users/42 → get user 42 - DELETE /users/42 → delete user 42
Next in Web & HTTP
HTTP Status Codes