Merge pull request #1373 from estiller/master

Fix bug in handling 204 "No Content" responses from the server in Android & Java generated clients
This commit is contained in:
wing328
2015-10-13 22:47:47 +08:00
2 changed files with 6 additions and 2 deletions
@@ -365,8 +365,10 @@ public class ApiInvoker {
int code = response.getStatusLine().getStatusCode();
String responseString = null;
if(code == 204)
if(code == 204) {
responseString = "";
return responseString;
}
else if(code >= 200 && code < 300) {
if(response.getEntity() != null) {
HttpEntity resEntity = response.getEntity();
@@ -365,8 +365,10 @@ public class ApiInvoker {
int code = response.getStatusLine().getStatusCode();
String responseString = null;
if(code == 204)
if(code == 204) {
responseString = "";
return responseString;
}
else if(code >= 200 && code < 300) {
if(response.getEntity() != null) {
HttpEntity resEntity = response.getEntity();