Is it recommended to send message body with DELETE?

Is it recommended to send message body with DELETE?

I see that in Apigee console, for DELETE , the Body tab is not enabled which means it does not allow us to send message body with DELETE. Whereas Postman, Mozilla RESTClient do allow this. Also I have tested that any DELETE resource in proxies are able to process request body payload.

0 3 74.3K
3 REPLIES 3

I followed a similar discussion in S.O here and found that though it is not recommended to have message body with DELETE but it is not forbidden.

What would you use the body for with a delete request? Provided it doesn't violate the spirit of the spec or result in unexpected behavior (eg sending the ID of a resource to delete) I personally would not fret about it too much.

From the HTTP/1.1 spec:

A payload within a DELETE request message has no defined semantics; sending a payload body on a DELETE request might cause some existing implementations to reject the request.

So, if it makes sense for your API to require a body, go ahead and provide one... I'm not sure what the use case for this would be though? I'm keen to hear your thoughts on why this would be useful for your API!