In short
GET, POST, PUT, PATCH, DELETE. Five verbs cover almost every API you'll build. Pick the right one and other developers understand your API before reading any docs.
GET reads data, POST creates it, PUT and PATCH update it and DELETE removes it. Your Express routes and React API calls are built around these methods.

Think of it like this
The canteen notice board
Reading the board is GET. Pinning up a new notice is POST. Swapping a notice for a fresh full copy is PUT. Fixing just the date on it is PATCH. Taking it down is DELETE. Same board, five different actions.
Watch it happen
One notice, five methods
POST /notices
1/6Create a new notice. The client doesn't choose the id, the server does.
The big ideas
What you need to know
GET only reads
GET must not change data. Browsers, caches and link previews send GET requests freely, assuming they're harmless.
POST creates
POST adds something new or triggers an action. Sending it twice usually creates two things.
PUT replaces, PATCH edits
PUT sends the full new version of a resource. PATCH sends only the fields that changed.
DELETE removes
DELETE /notices/9 removes that notice. Repeating it leaves the same result: still gone.
See it in code
Walk through the code
1const notices = new Map();2let nextId = 1;3app.get("/notices/:id", (req, res) => {4 const n = notices.get(Number(req.params.id));5 n ? res.json(n) : res.sendStatus(404);6});7app.post("/notices", (req, res) => {8 const n = { ...req.body, id: nextId++ };9 notices.set(n.id, n);10 res.status(201).json(n);11});12app.patch("/notices/:id", (req, res) => {13 const n = notices.get(Number(req.params.id));14 if (!n) return res.sendStatus(404);15 res.json(Object.assign(n, req.body, { id: n.id }));16});1/3GET looks the notice up and returns it, or 404 if it doesn't exist.
Assumes const app = express() and app.use(express.json()). A PUT route would swap the whole object, and app.delete would call notices.delete(id) and reply 204.
Save yourself the pain
Common mistakes
Oops
Using GET /deleteUser?id=5 to delete things.
Do this instead
Crawlers and link previews fire GET requests on their own. Use DELETE /users/5 so nothing is removed by accident.
Oops
Sending a PUT with only the changed field and wiping out the rest.
Do this instead
PUT means 'here is the complete new version'. For a partial update, use PATCH.
Your mission
Finish the notice board API
Quick check
A mobile app wants to change only a user's profile photo URL. Which request fits best?
Go deeper
- 1Match each method to an action in a todo app: list, add, edit, tick off and delete.
- 2Learn the common status codes that go with them: 200, 201, 400, 401, 404 and 500.
- 3Try a GET and a POST against a free public test API using your browser or Postman.
Also part of these roadmaps
More topics at this stop
Stuck on this topic? Ask an Insider
Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.