

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Difficulty: 4
click for more info
Not enough gems
Cost: 6 gems
1: HTTP Methods - GET
incomplete
2: Why Use HTTP Methods?
incomplete
3: POST Requests
incomplete
4: Status Codes
incomplete
5: Status Code Property
incomplete
6: PUT
incomplete
7: PATCH vs. PUT
incomplete
8: Delete
incomplete
This lesson's interactive features are locked, please to keep using them
The primary purpose of HTTP methods is to indicate to the server what we want to do with the resource we're trying to interact with. At the end of the day, an HTTP method is just a string, like GET, POST, PUT, or DELETE, but by convention, backend developers write their server code so that the methods correspond with different "CRUD" actions.
The "CRUD" actions are:
The bulk of the logic in most web applications is "CRUD" logic. Even a complex social media site is mostly just CRUD. Users create, read, update and delete their accounts. They create, read, update, and delete their posts. It's CRUD all the way down!
The 4 most common HTTP methods map nicely to the CRUD actions:
| HTTP Method | CRUD Action |
|---|---|
| GET | Read |
| POST | Create |
| PUT | Update |
| DELETE | Delete |
These mappings follow convention, not law. Some APIs may use POST for updating and creating, some might just skip DELETE.