Hello,
I want to use different IP addresses, which are available on my server with java.net.URLConnection, but when I try to use
Proxy proxyObj = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(ipaddress, 80));
HttpURLConnection con = (HttpURLConnection) url.openConnection(proxyObj);
....
BufferedReader reader = new BufferedReader(new InputStreamReader(con.getInputStream()));
I am getting the following exception:
java.io.IOException: Server returned HTTP response code: 400 for URL: http://www.google.com
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
....
Could you please advise me on how I can overcome this?