Skip to content

Upgrade of HttpClient breaks passing in http.proxyHost and http.proxyPort #379

@bjagg

Description

@bjagg

It looks like HttpClient requires a call now in the builder to pick up System properties. I suggest adding the following to your overrides context:

    <bean id="httpClientBuilder" class="org.apache.http.impl.client.HttpClientBuilder"
          factory-method="create">
          <property name="defaultRequestConfig" ref="requestConfig" />
          <property name="retryHandler" ref="retryHandler" />
          <property name="SSLSocketFactory" ref="sslSocketFactory" />
    </bean>

    <bean id="systemHttpClientBuilder" factory-bean="httpClientBuilder" 
          factory-method="useSystemProperties"/>

    <bean id="httpClient" factory-bean="systemHttpClientBuilder" factory-method="build" />

You may need to move the property nodes from the httpClientBuilder to the systemHttpClientBuilder.

If you get it to work, please let us know or submit a PR.

Thanks!
-bjagg

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions