I'm implementing DELETE support on a ReST API (build on ServiceStack) and wondering what response code to return following a successful DELETE.
HTTP defines 410 as:
The requested resource is no longer available at the server and no forwarding address is known. This condition is expected to be considered permanent. Clients with link editing capabilities SHOULD delete references to the Request-URI after user approval. If the server does not know, or has no facility to determine, whether or not the condition is permanent, the status code 404 (Not Found) SHOULD be used instead. This response is cacheable unless indicated otherwise.
Now, if a resource has just been DELETE
d, I probably do want many of those recommendations to apply... but accepted practice seems to be returning a 200 OK
following a successful DELETE
- especially since the 4XX
range is supposed to denote error conditions.
Any compelling arguments one way or another beyond the guidelines in the HTTP spec?
RFC 2616 Section 9.7 specifically states the following regarding the response for
DELETE
: