mirror of
				https://github.com/OpenAPITools/openapi-generator.git
				synced 2025-11-04 10:43:44 +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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user