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) (#953)

(cherry picked from commit a185edd)

Co-authored-by: Tobias Schaefer <[email protected]>
  • Loading branch information
jonathanlukas and tobiasschaefer authored Sep 24, 2024
1 parent d6778bd commit 560e599
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 @@ -27,7 +27,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 @@ -42,7 +42,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 560e599

Please sign in to comment.