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 "Khare, Aparna" <ap...@sap.com> on 2018/06/25 09:14:29 UTC

Redirection in httpClient

Hi All,

  We have moved our application to version 4.5.2 and we want to check how we can configure our httpclient to handle redirection ..

We connect to the proxy agent which takes only http calls. The redirected URL is https how can we enable the redirection only make an connection( HTTP proxy ).

Can we make redirectionStrategy to only make HTTP call even the call is https..

Thanks,
Aparna

Re: Redirection in httpClient

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, 2018-06-25 at 09:14 +0000, Khare, Aparna wrote:
> Hi All,
>  
>   We have moved our application to version 4.5.2 and we want to check
> how we can configure our httpclient to handle redirection ..
>  
> We connect to the proxy agent which takes only http calls. The
> redirected URL is https how can we enable the redirection only make
> an connection( HTTP proxy ).
>  
> Can we make redirectionStrategy to only make HTTP call even the call
> is https..
>  
> Thanks,
> Aparna

Aparna


You can either

1. use a custom RedirectStrategy that rewrites redirect locations from
https:// to http://

2. use custom HttpRoutePlanner to route all requests to 'http' port
instead of 'https'

Hope this helps

Oleg

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