HTTP verb
The method of an HTTP request saying which action is wanted: GET asks, POST creates, PUT replaces, PATCH changes a part and DELETE removes.
Example
PATCH /users/42 changes only user 42's email.
Test yourself: HTTP verb
REST APIs
You want to remove user 42. Which request do you make?
DELETE on /users/42 removes only that user; the other 999 stay.
Idempotency
PUT /users/42 with the name «Ana» is sent 3 times. How does the user end up?
PUT replaces the whole resource: doing it 3 times leaves user 42 the same as doing it 1 time. That's why PUT is idempotent and POST isn't.
0/2
â–¶ Play