java 代理请求接口 httpclient

 通过httpclient 代理ip和端口访问 接口

        if(StringUtils.isNotBlank(ip)){
            HttpHost proxy  =new HttpHost(ip, port);
            RequestConfig config = RequestConfig.custom().setProxy(proxy).build();
            post.setConfig(config);
原文地址:https://www.cnblogs.com/fangyuandoit/p/13713793.html