摘要:
HttpClient httpClient = new HttpClient();//设置代理服务器的ip地址和端口httpClient.getHostConfiguration().setProxy("10.0.3.99", 80);//使用抢先认证httpClient.getParams().setAuthenticationPreemptive(true);//如果代理需要密码验证,这里设置用户名密码 httpClient.getState().setProxyCredentials(AuthScope.ANY, new UsernamePasswordCredent 阅读全文