Skip to content

Commit

Permalink
revert apache connector (#880)
Browse files Browse the repository at this point in the history
  • Loading branch information
jreddig authored and danoswaltCL committed Aug 3, 2023
1 parent e686ddf commit 6f4227a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,8 @@
import javax.ws.rs.client.ClientBuilder;
import javax.ws.rs.core.MediaType;

import org.glassfish.jersey.apache.connector.ApacheConnectorProvider;
import org.glassfish.jersey.client.ClientConfig;
import org.glassfish.jersey.client.ClientProperties;
import org.glassfish.jersey.client.HttpUrlConnectorProvider;


public class APIService implements AutoCloseable{
Expand All @@ -36,7 +35,7 @@ public APIService(String baseUrl, String authToken, String sessionId, Map<String
}

public static Client createClient(Map<String,Object> properties) {
Client client = ClientBuilder.newClient(new ClientConfig().connectorProvider(new ApacheConnectorProvider()));
Client client = ClientBuilder.newClient();
client.property(ClientProperties.CONNECT_TIMEOUT, 3000);
client.property(ClientProperties.READ_TIMEOUT, 3000);
properties.entrySet().stream()
Expand All @@ -58,6 +57,7 @@ public AsyncInvoker prepareRequest(String apiPath) {
.request(MediaType.APPLICATION_JSON)
.header("Authorization", "Bearer "+this.authToken)
.header("Session-Id", this.sessionId)
.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true)
.async();
}

Expand Down

0 comments on commit 6f4227a

Please sign in to comment.