hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Handling Redirects automatically in HttpClient4.0.1
Date Sat, 24 Apr 2010 08:54:53 GMT
On Sat, 2010-04-24 at 11:49 +0530, Phani Sajja wrote:
> Hi Oleg,
>          Here is the sample code which I am trying to get the search results
> 
>     String host = "www.tkdl.res.in";
>     String searchURI = "/tkdl/langdefault/common/TKDLSearch.asp?GL=Eng";
>         DefaultHttpClient httpclient = new DefaultHttpClient();
> 
>         httpclient.getCredentialsProvider().setCredentials(
>                 new AuthScope("172.31.100.14", 3128),
>                 new UsernamePasswordCredentials("user", "pass"));
> 
>         HttpHost targetHost = new HttpHost(host);
>         HttpHost proxy = new HttpHost("172.31.100.14", 3128);
> 
>         httpclient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY,
> proxy);
>         httpclient.getParams().setParameter(ClientPNames.HANDLE_REDIRECTS,
> false);
> 

Ehhh? You are kidding, right?

Oleg


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


Mime
View raw message