标签:重试 nec nbsp url cti class clinet out blog
// 1.生成 HttpClinet 对象并设置参数 HttpClient httpClient = new DefaultHttpClient(); // 设置 HTTP 连接超时 5s httpClient.getParams().setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 5000); // 2.生成 GetMethod 对象并设置参数 HttpGet httpGet = new HttpGet(url); // 设置 get 请求超时 5s httpGet.getParams().setParameter(CoreConnectionPNames.SO_TIMEOUT, 5000); // 设置请求重试处理
标签:重试 nec nbsp url cti class clinet out blog
原文地址:http://www.cnblogs.com/halo-yang/p/7352529.html