DEV Community

Cover image for RESTful verbs vs Real actions
Tobias Nickel
Tobias Nickel

Posted on

6 2

RESTful verbs vs Real actions

In http rest APIs we are stuck with a very limited set of verbs. They are essentially:

  • get: to load data
  • post: to create new data
  • put: to replace data
  • patch: to update data
  • delete: to remove data

These are the verbs of a typical CRUD operation. They are very effective. But let me tell you a story:

In the afternoon you patch your location to your mothers house. After that you get her data and patch her status to happy.

This is a small situation, told as if you tell a story to a database. Here is the same story, but for the application layer:

In the afternoon you drive into the city to your mothers house. After you see her, you notice her pretty dress. You make her a nice compliment. That makes her very happy.

What version of the story do you prefer?

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

AWS Q Developer image

Your AI Code Assistant

Generate and update README files, create data-flow diagrams, and keep your project fully documented. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay