5 ms·
It's not just the original REST that usually has no benefits. The industry's reinterpreted version of weak REST also usually has little to no benefits. Who real
by kccqzy 1y ago
It's not just the original REST that usually has no benefits. The industry's reinterpreted version of weak REST also usually has little to no benefits. Who really cares that deleting a resource must necessarily be done with the DELETE HTTP verb rather than simply a POST?
- s_ting765 1y agoThe DELETE verb exists, there's no reason not to use it.
- Balooga 1y agoThere is one reason. The DELETE absolutely must be idempotent. If it's not, then use POST.
- kccqzy 1y agoAnd you just added more work to yourself to interpret the HTTP verb. You already need work to interpret the body of a POST request, so why not put the information of "the operation is trying to delete" inside the body?
- marcosdumay 1y agoThe POST verb exists, there's no reason not to use it to ask a server to delete data. In fact, there are plenty of reasons not to use DELETE and PUT. Middleboxes managed by incompetent security people block them, they require that developers have a minimum of expertise and don't break the idempotency rule, lots of software stacks simply don't support them (yeah, those stacks are bad, what still doesn't change anything), and the most of the internet just don't use the benefit they provide (because they don't trust the developers behind the server to not break the rules).
- jeff_tyrrill 1y agoThere's a great reason: I'm using HTTP only as a transport layer, not a semantic layer.
- cryptonector 1y agoYou have to represent the action somehow. And letting proxies understand a wee bit of what's going on is useful. That's how you can have a proxy that lets your users browse the web but not login to external sites, and so on.