System Design · Junior · Question 4 of 75
What does the REST principle "resources + HTTP methods" mean?
- ✓Correct answer: The URL identifies a resource and the method an action:
GET /users/1,DELETE /users/1 - 2All actions go through
POST /apiwith the operation name in the body - 3Each action gets its own URL like
/getUseror/deleteUser
Explanation
REST uses nouns in URLs and the semantics of HTTP methods: GET reads, POST creates, PUT/PATCH update, DELETE deletes. This makes the API predictable, and caches and proxies understand the meaning of requests.