mirror of https://github.com/halo-dev/halo
parent
2b8f218c8f
commit
b40c3f7ed9
|
@ -45,9 +45,9 @@ public class HttpClientUtils {
|
|||
.build();
|
||||
|
||||
return HttpClients.custom()
|
||||
.setSSLContext(sslContext)
|
||||
.setSSLHostnameVerifier(new NoopHostnameVerifier())
|
||||
.setDefaultRequestConfig(getReqeustConfig(timeout))
|
||||
.setSSLContext(sslContext)
|
||||
.setSSLHostnameVerifier(new NoopHostnameVerifier())
|
||||
.setDefaultRequestConfig(getRequestConfig(timeout))
|
||||
.build();
|
||||
}
|
||||
|
||||
|
@ -57,12 +57,12 @@ public class HttpClientUtils {
|
|||
* @param timeout connection timeout (ms)
|
||||
* @return request config
|
||||
*/
|
||||
private static RequestConfig getReqeustConfig(int timeout) {
|
||||
private static RequestConfig getRequestConfig(int timeout) {
|
||||
return RequestConfig.custom()
|
||||
.setConnectTimeout(timeout)
|
||||
.setConnectionRequestTimeout(timeout)
|
||||
.setSocketTimeout(timeout)
|
||||
.build();
|
||||
.setConnectTimeout(timeout)
|
||||
.setConnectionRequestTimeout(timeout)
|
||||
.setSocketTimeout(timeout)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue