hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mbeds1 <narender.si...@bayer.com>
Subject Re: get InetAddress for the HTTP_TARGET_HOST
Date Tue, 12 Feb 2013 05:48:51 GMT
Hi Telvis,

I've used your solution but getting some problem. I'm getting my proxy ip
address instead of host (like google.com) ip address. I have set the proxy
but still getting the same ip:
Following is the code where I'm setting proxy and using your code:

        ClientConnectionManager conman = new AladoClientConnectionManager()
        HttpHost proxy = new HttpHost("<proxy-name>", <port>, "http")
        HttpParams params = new BasicHttpParams()
        params.setParameter(ClientPNames.HANDLE_REDIRECTS, false)
        params.setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy)
        DefaultHttpClient httpclient = new DefaultHttpClient(conman, params)
AuthScope("<proxy-name>", <port>), new
UsernamePasswordCredentials("<proxy-user>", "<password>"))

Also when i print the context in the Custom client operator class i'm
getting the proxy params correctly. Please let me know if you need some
additional info. 

View this message in context: http://httpcomponents.10934.n7.nabble.com/get-InetAddress-for-the-HTTP-TARGET-HOST-tp18332p19322.html
Sent from the HttpClient-User mailing list archive at Nabble.com.

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

View raw message