You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Li Li <fa...@gmail.com> on 2014/08/14 12:50:22 UTC

how to set http proxy like DnsResolver

I know how to set proxy by
RequestConfig config = RequestConfig.custom()
                    .setProxy(proxy)
                    .build();
But I want to use different proxy for different host.
in the constructor of PoolingHttpClientConnectionManager, I can pass
it a DnsResolver so I can do anything of dns resolver. how can I do
with proxy setting?

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: how to set http proxy like DnsResolver

Posted by Li Li <fa...@gmail.com>.
I find a solution. using custom MyHttpRoutePlanner extends DefaultRoutePlanner

On Thu, Aug 14, 2014 at 6:50 PM, Li Li <fa...@gmail.com> wrote:
> I know how to set proxy by
> RequestConfig config = RequestConfig.custom()
>                     .setProxy(proxy)
>                     .build();
> But I want to use different proxy for different host.
> in the constructor of PoolingHttpClientConnectionManager, I can pass
> it a DnsResolver so I can do anything of dns resolver. how can I do
> with proxy setting?

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org