mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 10:58:55 +00:00
Updated sample code to reflect changes.
This commit is contained in:
parent
0d40a53e06
commit
9686ceed2d
@ -12,6 +12,7 @@ import com.sun.jersey.api.client.config.DefaultClientConfig;
|
||||
import com.sun.jersey.api.client.filter.LoggingFilter;
|
||||
import com.sun.jersey.api.client.WebResource.Builder;
|
||||
|
||||
import javax.ws.rs.core.Response.Status.Family;
|
||||
import javax.ws.rs.core.MediaType;
|
||||
|
||||
import java.util.Map;
|
||||
@ -123,7 +124,10 @@ public class ApiInvoker {
|
||||
else {
|
||||
throw new ApiException(500, "unknown method type " + method);
|
||||
}
|
||||
if(response.getClientResponseStatus() == ClientResponse.Status.OK) {
|
||||
if(response.getClientResponseStatus() == ClientResponse.Status.NO_CONTENT) {
|
||||
return null;
|
||||
}
|
||||
else if(response.getClientResponseStatus().getFamily() == Family.SUCCESSFUL) {
|
||||
return (String) response.getEntity(String.class);
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user