|
|
@@ -244,7 +244,12 @@ public class VideoDockingServiceImpl implements VideoDockingService {
|
|
|
log.info("REQUEST URI:{}", url);
|
|
|
url = getRequestGetUri(url, paramValues);
|
|
|
log.info("REQUEST getRequestGetUri URI:{}", url);
|
|
|
- RequestConfig defaultConfig = RequestConfig.custom().setCookieSpec(CookieSpecs.STANDARD).build();
|
|
|
+ RequestConfig defaultConfig = RequestConfig.custom()
|
|
|
+ //连接超时时间10秒
|
|
|
+ .setConnectTimeout(10000)
|
|
|
+ //数据读取超时时间5秒
|
|
|
+ .setSocketTimeout(5000)
|
|
|
+ .setCookieSpec(CookieSpecs.STANDARD).build();
|
|
|
HttpGet httpGet = new HttpGet(url);
|
|
|
httpGet.setHeader("Content-Type", "application/json;charset=UTF-8");
|
|
|
httpGet.setHeader("Connection", "keep-alive");
|
|
|
@@ -280,7 +285,12 @@ public class VideoDockingServiceImpl implements VideoDockingService {
|
|
|
String url = String.format("%s" + uri, URI);
|
|
|
log.info("REQUEST URI:{},cooke:{}", url, cookie);
|
|
|
url = getRequestGetUri(url, paramValues);
|
|
|
- RequestConfig defaultConfig = RequestConfig.custom().setCookieSpec(CookieSpecs.STANDARD).build();
|
|
|
+ RequestConfig defaultConfig = RequestConfig.custom()
|
|
|
+ //连接超时时间10秒
|
|
|
+ .setConnectTimeout(10000)
|
|
|
+ //数据读取超时时间5秒
|
|
|
+ .setSocketTimeout(5000)
|
|
|
+ .setCookieSpec(CookieSpecs.STANDARD).build();
|
|
|
|
|
|
// 2. 创建POST请求
|
|
|
HttpDelete httpDelete = new HttpDelete(url);
|