Skip to content

Commit

Permalink
Underlying HTTP client evaluates system properties, e.g. proxy settin…
Browse files Browse the repository at this point in the history
…gs (#943)
  • Loading branch information
tobiasschaefer authored Sep 24, 2024
1 parent 3f1894c commit a185edd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static SaaSAuthenticationBuilder builder() {
}

private TokenResponse retrieveToken(Product product, JwtCredential jwtCredential) {
try (CloseableHttpClient client = HttpClients.createDefault()) {
try (CloseableHttpClient client = HttpClients.createSystem()) {
HttpPost request = buildRequest(jwtCredential);
return client.execute(
request,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public SimpleConfig getSimpleConfig() {
}

private Map<String, String> retrieveToken(Product product, SimpleCredential simpleCredential) {
try (CloseableHttpClient client = HttpClients.createDefault()) {
try (CloseableHttpClient client = HttpClients.createSystem()) {
HttpPost request = buildRequest(simpleCredential);

Map<String, String> headers =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class DefaultHttpClient implements HttpClient {

public DefaultHttpClient(Authentication authentication) {
this.authentication = authentication;
this.httpClient = HttpClients.createDefault();
this.httpClient = HttpClients.createSystem();
this.jsonMapper = new SdkObjectMapper();
this.productMap = new HashMap<>();
}
Expand Down

0 comments on commit a185edd

Please sign in to comment.