Skip to content

Latest commit

 

History

History
28 lines (17 loc) · 1.05 KB

use_verbs.md

File metadata and controls

28 lines (17 loc) · 1.05 KB

Use Verbs

Use the verbs specified for the HTTP protocol to get the most our of you HTTP based API.

The verbs are more correctly named: HTTP request methods and the term verbs is also widely used.

  • POST for creation
  • GET for reading
  • PUT for complete updating or replacing
  • PATCH for partial updating or modifying
  • DELETE for deletion

If you, like me cannot remember, which of the verbs does what, like POST, PUT and PATCH you can use these simple rules of thumb, the first one I got from a colleague:

The U in PUT is for update

And now for one I had to make for myself:

Post is always delivered at the gate, so when thinking about POST, remember gate rhymes with create...

And the last one is for PATCH, if you are RESTful

PATCH can do a partial update compared to PUT so "PAT" is short for partial...

Resources and References: