调用超时时间设置10s

v1.7
xueli.xue 8 years ago
parent 09aad11fd1
commit efba14745a

@ -42,7 +42,12 @@ public class HttpClientUtil {
}*/
// timeout
RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(10000).setConnectTimeout(10000).build();
RequestConfig requestConfig = RequestConfig.custom()
.setConnectionRequestTimeout(10000)
.setSocketTimeout(10000)
.setConnectTimeout(10000)
.build();
httpPost.setConfig(requestConfig);
// data

Loading…
Cancel
Save