CloseableHttpClient设置代理

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