Quiz Entry - updated: 2026.10.15
What do the HTTP methods GET, POST, PUT, PATCH and DELETE do in a REST API?
- GET reads data.
- POST submits data to a target (often creates something).
- PUT replaces data at a target.
- PATCH changes or adds to data at a target without replacing all of it.
- DELETE removes data.
| Method | Action | Example |
|---|---|---|
| GET | Request data | Show a web page, list devices |
| POST | Submit data to a target | Send login credentials, create a resource |
| PUT | Replace data at a target | Update the NTP server (replace the setting) |
| PATCH | Append to / partially modify data | Add one more NTP server |
| DELETE | Remove data from a target | Remove an NTP server |
GET is the only one of these that must not change anything, which is why it is safe to repeat. The other four change state on the device, exactly as if someone typed the equivalent CLI commands.
Go deeper:
HTTP request methods — MDN — every method with its safety and idempotency properties.