public static RequestConfig getDefaultRequestConfigWithSocketTimeout ( int soTimeoutMs , boolean withoutCookies ) { getHttpClient ( ) ; final String cookieSpec = withoutCookies ? IGNORE_COOKIES : DEFAULT ; return RequestConfig . copy ( DefaultRequestConfig ) . setSocketTimeout ( soTimeoutMs ) . setCookieSpec ( cookieSpec ) . build ( ) ; }
Return a request configuration inheriting from the default request configuration of the shared HttpClient with a different socket timeout .