Hacker News new | ask | show | jobs
by avoidwork 1817 days ago
Hi,

Yes, it matters. You're misusing POST in the first example.

C = POST R = GET U = PUT/PATCH D = DELETE

Doing anything else is an anti-pattern for interop on the web.

3 comments

Usage of POST to update is so common, I don't think it's unreasonable to say it's a de-facto standard. Sort of like how if an English word/phrase is misused enough, the "wrong" version eventually makes it into dictionaries.
This is the first time I hear that usage of POST to update is common.

Around me I cannot name one backend developer who will design an API with POST used for update. We did it in the past when browsers where not implementing PUT or PATCH but still sending method=PUT/PATCH as param.

Of course this is my experience and I might be in a bubble.

It doesn't really matter though.

If you misuse POST nobody and nothing is going to care. Literally every traditional web application, including this very site, "misuses" POST all the time.

I often really like "anti-patterns."

They're usually a case of a ["desire path"](https://miro.medium.com/max/2592/0%2AD1R7QvewXmwUVytD.)

Typically, it says more to me about the designer than the users.