3 ms·
DELETE doesn't have to remove the entire resource, it's up to the receiving service on how to implement it.
by gregorty 4y ago
DELETE doesn't have to remove the entire resource, it's up to the receiving service on how to implement it.
- actually_a_dog 4y agoExactly. I have issues with this approach, but "DELETE is defined to..." is not one of them. DELETE does whatever the fuck you want it to.
- Sharparam 4y agoAbusing HTTP methods like this is something ElasticSearch does on some of their APIs. This is annoying because spec-compliant tools don't always play nice with them. For example: ElasticSearch can take a body on some GET requests, but many tools will not let you do this because a GET request should not have a body.
- toomim 4y agoIf you have a proxy, cache, or middlebox in your network, and you use DELETE to mean "remove this key from the JSON object" your proxy won't know that, and will happily delete the entire resource, and tell everyone else that the resource has been deleted, and then your data will disappear, and that's not very fun.