In plain words
Every request carries a method that says what it wants: GET reads, POST creates, PUT or PATCH updates, and DELETE removes something.
Where you see it
The Method column in the Network tab shows GET as a page loads and POST when you place a QuickBite order. In a Next.js route file, each method is its own exported function named GET, POST or DELETE.
What goes wrong
- Deleting with a GET link
Link previews, prefetching and crawlers follow GET links on their own. A GET that deletes can wipe data nobody meant to touch.
<a href="/api/notes/42/delete">Delete</a> - Putting a body on a GET request
GET requests can't carry a body, and fetch throws an error if you try. Filters belong in the address instead, like /api/posts?author=maya.
- A method and a route that don't match
The form sends POST but the route only exports GET, and the reply is 405 Method Not Allowed. The address is right; the verb is wrong.
What to tell your agent
Quick check
Sign in to earn +10 XP for itSaving a note returns 405 Method Not Allowed. What does that tell you?