httpclient FQ代理配置


httpclient版本 4.2x

  1. BasicHttpParams params = new BasicHttpParams();
  2. HttpConnectionParams.setConnectionTimeout(params, 30000);
  3. HttpConnectionParams.setSoTimeout(params, 30000);
  4. HttpClient httpClient = new DefaultHttpClient(params);
  5. HttpHost proxy = new HttpHost("127.0.0.1", 8087);
  6. httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);


以上代码  配合  goagent实现的

posted on 2017-03-22 09:12  signheart  阅读(14)  评论(0编辑  收藏  举报

导航