You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Rob Godfrey (JIRA)" <ji...@apache.org> on 2016/03/04 15:28:40 UTC

[jira] [Created] (QPID-7125) [Java Broker] REST API return code when deleting a resource which does not exist

Rob Godfrey created QPID-7125:
---------------------------------

             Summary: [Java Broker] REST API return code when deleting a resource which does not exist
                 Key: QPID-7125
                 URL: https://issues.apache.org/jira/browse/QPID-7125
             Project: Qpid
          Issue Type: Bug
          Components: Java Broker
            Reporter: Rob Godfrey


>From this mail: http://qpid.2158936.n2.nabble.com/potential-java-broker-REST-API-bug-tp7639681.html 

{quote}
A DELETE request, if not resulting in an error, will always return HTTP status 200 and no body content, no matter if a queue with that name exists or not
{quote}

There seem to be a number of views on the correct behaviour here in REST APIs, based somewhat on how one interprets the notion of idempotence.

See for example http://stackoverflow.com/questions/23486992/rest-api-proper-http-status-code-for-invalid-delete  and http://stackoverflow.com/questions/6439416/deleting-a-resource-using-http-delete 

http://www.restapitutorial.com/lessons/httpmethods.html suggests 404 for such a case, but also points mentions how 204 (empty body) and 200 (which maybe should return the representation of the deleted entity) can be used in the non failure case



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org