首页 > 技术文章 > CloseableHttpClient设置代理

lizhenlzlz 2017-04-19 22:37 原文

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

推荐阅读