Replacing getClientResponseStatus() with getStatusInfo()

This commit is contained in:
Andrew B
2015-06-18 14:41:17 -07:00
parent 6ad3a717fe
commit 1aeb50feef
4 changed files with 8 additions and 8 deletions

View File

@@ -421,10 +421,10 @@ public class ApiClient {
throw new ApiException(500, "unknown method type " + method);
}
if(response.getClientResponseStatus() == ClientResponse.Status.NO_CONTENT) {
if(response.getStatusInfo() == ClientResponse.Status.NO_CONTENT) {
return null;
}
else if(response.getClientResponseStatus().getFamily() == Family.SUCCESSFUL) {
else if(response.getStatusInfo().getFamily() == Family.SUCCESSFUL) {
if(response.hasEntity()) {
return (String) response.getEntity(String.class);
}
@@ -445,7 +445,7 @@ public class ApiClient {
}
}
throw new ApiException(
response.getClientResponseStatus().getStatusCode(),
response.getStatusInfo().getStatusCode(),
message,
response.getHeaders(),
respBody);

View File

@@ -420,10 +420,10 @@ public class ApiClient {
throw new ApiException(500, "unknown method type " + method);
}
if(response.getClientResponseStatus() == ClientResponse.Status.NO_CONTENT) {
if(response.getStatusInfo() == ClientResponse.Status.NO_CONTENT) {
return null;
}
else if(response.getClientResponseStatus().getFamily() == Family.SUCCESSFUL) {
else if(response.getStatusInfo().getFamily() == Family.SUCCESSFUL) {
if(response.hasEntity()) {
return (String) response.getEntity(String.class);
}
@@ -444,7 +444,7 @@ public class ApiClient {
}
}
throw new ApiException(
response.getClientResponseStatus().getStatusCode(),
response.getStatusInfo().getStatusCode(),
message,
response.getHeaders(),
respBody);

View File

@@ -322,7 +322,7 @@ public class PetApi {
}
try {
String[] authNames = new String[] { "petstore_auth", "api_key" };
String[] authNames = new String[] { "api_key", "petstore_auth" };
String response = apiClient.invokeAPI(path, "GET", queryParams, postBody, headerParams, formParams, accept, contentType, authNames);
if(response != null){
return (Pet) apiClient.deserialize(response, "", Pet.class);

View File

@@ -1,8 +1,8 @@
package io.swagger.client.model;
import io.swagger.client.model.Category;
import java.util.*;
import io.swagger.client.model.Tag;
import java.util.*;
import io.swagger.annotations.*;
import com.fasterxml.jackson.annotation.JsonProperty;