DELETE and 201 Created

Just thought about a useful combination of DELETE and a 201 Created response:

DELETE /service/documents/667
 
201 Created
Location: /service/archive/documents/667
Content-Type: text/plain
 
Document /service/documents/667 has been deleted
and archived at /service/archive/documents/667.

6 Responses to “DELETE and 201 Created”

  1. [...] protocol – The latest update to the REST-* Message draft specification. (by Bill Burke) DELETE and 201 Created – An interesting way to combine the DELETE verb and the 201 response. (by Jan Algermissen) [...]

  2. Interesting, I had a similar thought. What I came up with is that, although the resource has been deleted, the URI redirects to the new archive entry instead of resulting in 410 GONE (or plain old 404).

  3. IMO, 201 is a confusing response. 200 or 204 w/ a Location header is just as handy.

  4. jan says:

    Mike,
    but Location header does not indicate resource creation. The meaning of the Location header depends on the status.

  5. ALBERT says:


    Pillspot.org. Canadian Health&Care.No prescription online pharmacy.Special Internet Prices.Best quality drugs. Online Pharmacy. Buy drugs online

    Buy:Super Active ED Pack.Maxaman.Cialis Soft Tabs.Propecia.Viagra Professional.Viagra.Cialis Super Active+.Viagra Super Active+.Soma.Viagra Super Force.Tramadol.Levitra.Cialis Professional.Cialis.Viagra Soft Tabs.VPXL.Zithromax….

Leave a Reply