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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to