Reputation: 534
When performing REST POST and PUT, you can include form field values as part of the request.
As I understand REST DELETE(and PUT) identifies the resource by the URI. Does it make sense to also include form field values when performing a REST DELETE?
Upvotes: 1
Views: 727
Reputation: 12883
First thing, when you PUT or POST data, you may support representations other than application/x-www-form-urlencoded
(form data). For example, you might send an entire entity and represent it as a JSON object. You can send any type of data in a request. Whether it's form data or otherwise.
Back to your question though. You can send data in a delete request. Initially, I couldn't think of much use for that, but if you had implemented an optimistic locking scheme on the server side, it might be useful to send data with the delete request so the server can detect if the client is attempting to work on stale data.
Upvotes: 1