Skip to content

Evaluate system properties in default HttpClient in ReactorClientHttpRequestFactory #34850

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ public class ReactorClientHttpRequestFactory implements ClientHttpRequestFactory
private static final Log logger = LogFactory.getLog(ReactorClientHttpRequestFactory.class);

private static final Function<HttpClient, HttpClient> defaultInitializer =
client -> client.compress(true).responseTimeout(Duration.ofSeconds(10));
client -> client.compress(true)
.responseTimeout(Duration.ofSeconds(10))
.proxyWithSystemProperties();


private final @Nullable ReactorResourceFactory resourceFactory;
Expand All @@ -69,7 +71,8 @@ public class ReactorClientHttpRequestFactory implements ClientHttpRequestFactory

/**
* Constructor with default client, created via {@link HttpClient#create()},
* and with {@link HttpClient#compress compression} enabled.
* and with {@link HttpClient#compress compression} and
* {@link HttpClient#proxyWithSystemProperties() proxyWithSystemProperties} enabled.
*/
public ReactorClientHttpRequestFactory() {
this(defaultInitializer.apply(HttpClient.create()));
Expand Down