From 6f4227a204e1ba6121919493d1d39bfdbe3b1e5d Mon Sep 17 00:00:00 2001 From: jreddig <97543136+jreddig@users.noreply.github.com> Date: Thu, 15 Jun 2023 13:31:17 -0400 Subject: [PATCH] revert apache connector (#880) --- .../src/main/java/org/upgradeplatform/utils/APIService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/clientlibs/java/src/main/java/org/upgradeplatform/utils/APIService.java b/clientlibs/java/src/main/java/org/upgradeplatform/utils/APIService.java index 15c0359b55..2c7158163c 100644 --- a/clientlibs/java/src/main/java/org/upgradeplatform/utils/APIService.java +++ b/clientlibs/java/src/main/java/org/upgradeplatform/utils/APIService.java @@ -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{ @@ -36,7 +35,7 @@ public APIService(String baseUrl, String authToken, String sessionId, Map 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() @@ -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(); }