Commit efba1474 by xueli.xue

调用超时时间设置10s

parent 09aad11f
...@@ -42,7 +42,12 @@ public class HttpClientUtil { ...@@ -42,7 +42,12 @@ public class HttpClientUtil {
}*/ }*/
// timeout // timeout
RequestConfig requestConfig = RequestConfig.custom().setSocketTimeout(10000).setConnectTimeout(10000).build(); RequestConfig requestConfig = RequestConfig.custom()
.setConnectionRequestTimeout(10000)
.setSocketTimeout(10000)
.setConnectTimeout(10000)
.build();
httpPost.setConfig(requestConfig); httpPost.setConfig(requestConfig);
// data // data
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment