4 ms·
The DELETE verb exists, there's no reason not to use it.
by s_ting765 1y ago
The 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.