[
https://issues.apache.org/jira/browse/STRATOS-1380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Mariangela Hills resolved STRATOS-1380.
---------------------------------------
Resolution: Fixed
Fix Version/s: 4.1.0
This error has been fixed by imesh as mentioned in the mail thread [1]
[1] Sequential order of the REST API response message and status code is
incorrect
---------- Forwarded message ----------
From: Imesh Gunaratne <[email protected]>
Date: Mon, May 11, 2015 at 6:03 PM
Subject: Re: Sequential order of the REST API response message and status code
is incorrect
To: dev <[email protected]>
Hi Devs,
I just fixed the above issue in all the API methods and exception handlers. Now
the API only returns the below response message format unless it is a data set:
{
"status" : "[success|error]",
"message" : ""
}
Thanks,
--
Imesh Gunaratne
Senior Technical Lead, WSO2
Committer & PMC Member, Apache Stratos
> Incorrect order of message and status code in response
> ------------------------------------------------------
>
> Key: STRATOS-1380
> URL: https://issues.apache.org/jira/browse/STRATOS-1380
> Project: Stratos
> Issue Type: Bug
> Components: REST API
> Affects Versions: 4.1.0 Beta2
> Reporter: Mariangela Hills
> Assignee: Imesh Gunaratne
> Fix For: 4.1.0
>
>
> Currently, when executing any REST API commands, the status code appears
> after the message and not before the message, as discussed in the mail
> thread. This needs to be corrected.
> > POST /api/applicationPolicies HTTP/1.1
> > Authorization: Basic YWRtaW46YWRtaW4=
> > User-Agent: curl/7.24.0 (x86_64-apple-darwin12.0) libcurl/7.24.0
> > OpenSSL/0.9.8| zlib/1.2.5
> > Host: localhost:9443
> > Accept: */*
> > Content-Type: application/json
> > Content-Length: 307
> >
> * upload completely sent off: 307 out of 307 bytes
> < HTTP/1.1 201 Created
> < Date: Sat, 09 May 2015 08:55:20 GMT
> < Location:
> https://localhost:9443/api/applicationPolicies/application-policy-1
> < Content-Type: application/json
> < Transfer-Encoding: chunked
> < Server: WSO2 Carbon Server
> <
> * Connection #0 to host localhost left intact
> {"message":"Application policy added successfully: [application-policy]
> application-policy-1","statusCode":201}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)