March 7, 2020 11:49 pm GMT
Original Link: https://dev.to/yujiri8/when-should-i-use-http-verbs-4pik
When should I use HTTP verbs?
When is it a good idea to use PUT
and DELETE
for APIs, instead of separate endpoint names (like POST /comments/post
vs POST /comments/delete
)?
My website's comment API uses mostly a single endpoint, with GET
, POST
, PUT
(for editing), and DELETE
handlers, and the same thing for the conlang dictionary. But ever since the day I implemented them I've felt agonizingly ambivalent about the decision, and I'm still not really satisfied. The pragmatist in me says use the available features of the protocol, but the simplist in me says don't use PUT
and DELETE
because it's bad design for the protocol to know about that.
Original Link: https://dev.to/yujiri8/when-should-i-use-http-verbs-4pik
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To