[ https://issues.apache.org/jira/browse/STRATOS-1270?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14494413#comment-14494413 ]
Chamila de Alwis edited comment on STRATOS-1270 at 4/14/15 5:15 PM: -------------------------------------------------------------------- Hi Mary, It is allowed to return a 200 Ok status with a content body for a successful DELETE operation[1]. In this case the content body contains the message that is displayed in the UI. Therefore 204 No Content would not serve the purpose. I can't see the Location header field when executing this method through CURL. Perhaps you can provide specifically what the headers you are receiving? {code} > DELETE /api/deploymentPolicies/deployment-policy-1 HTTP/1.1 > Authorization: Basic YWRtaW46YWRtaW4= > User-Agent: curl/7.35.0 > Host: localhost:9443 > Accept: */* > < HTTP/1.1 200 OK < Date: Tue, 14 Apr 2015 17:09:08 GMT < Content-Type: application/json < Transfer-Encoding: chunked * Server WSO2 Carbon Server is not blacklisted < Server: WSO2 Carbon Server < * Connection #0 to host localhost left intact {"statusCode":200,"successMessage":"Deployment policy removed successfully: [deployment-policy-id] deployment-policy-1"} {code} [1] - http://tools.ietf.org/html/rfc7231#section-4.3.5 Regards, Chamila was (Author: chamilad): Hi Mary, It is allowed to return a 200 Ok status with a content body for a successful DELETE operation. In this case the content body contains the message that is displayed in the UI. Therefore 204 No Content would not serve the purpose. I can't see the Location header field when executing this method through CURL. Perhaps you can provide specifically what the headers you are receiving? Regards, Chamila > Wrong HTTP output - DELETE /deploymentPolicies/{deploymentPolicyId} > ------------------------------------------------------------------- > > Key: STRATOS-1270 > URL: https://issues.apache.org/jira/browse/STRATOS-1270 > Project: Stratos > Issue Type: Sub-task > Components: REST API > Affects Versions: 4.1.0 Alpha > Reporter: Mariangela Hills > > The following issues were identified when executing the DELETE HTTP method > with the /deploymentPolicies/{deploymentPolicyId} REST API resource. > # Normally the 204 HTTP status code should be returned when deleting. > However, in this situation the 201 and 200 HTTP status codes are returned, > which is incorrect. > # When deleting an artifact the location header URL should not be returned. > However, in this situation it is returned. -- This message was sent by Atlassian JIRA (v6.3.4#6332)