Aug 29, 2011
Set proxy cho HttpURLConnection
String proxy = "proxy.mydomain.com",
port = "8080";
URL url = new URL( "http://www.google.com/" );
Properties systemProperties = System.getProperties();
systemProperties.setProperty("http.proxyHost",proxy);
systemProperties.setProperty("http.proxyPort",port);
HttpURLConnection connection = (HttpURLConnection)url.openConnection();
connection.connect();
Subscribe to:
Post Comments (Atom)
0 nhận xét:
Post a Comment