code: 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();
    }
docs: Return a request configuration inheriting from the default request
  configuration of the shared HttpClient with a different socket timeout.
  
  @param soTimeoutMs    - custom socket timeout in milli-seconds
  @param withoutCookies - whether this request should ignore cookies or not
  @return RequestConfig object