HttpGet httpget = new HttpGet("http://www.apache.org/");
RequestConfig requestConfig = RequestConfig.copy(defaultRequestConfig)
.setProxy(new HttpHost("myotherproxy", 8080)) .build(); httpget.setConfig(requestConfig);
原文
http://www.tuicool.com/articles/MjumArm
转载于:https://www.cnblogs.com/lizhenlzlz/p/6736309.html