Is a response-body allowed for a HTTP-DELETE-request?

scrrr picture scrrr · Jul 5, 2011 · Viewed 39.8k times · Source

I assume the response code 200 always allows for a response-body, but I can't find any explicit mention of response-bodies for DELETE-requests.

Answer

fyr picture fyr · Jul 5, 2011

It is explicitly mentioned here in the RFC

The short answer is:

You should include a response body with an entity describing the deleted item/resource if you return 200.

202 is something like an asynchronous request/response return status.

204 says explicitly that you do not include a response body