forked from loafle/openapi-generator-original
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:
@@ -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();
|
||||
|
||||
+3
-1
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user