code: public static final HttpClient getClient(int timeout) {
          HttpClientBuilder client = HttpClientBuilder.create();
          // set the connection manager
          client.setConnectionManager(connectionManager);
          // dont retry
          client.setRetryHandler(new DefaultHttpRequestRetryHandler(0, false));
          // establish a connection within x seconds
          RequestConfig config = RequestConfig.custom().setSocketTimeout(timeout).build();
          client.setDefaultRequestConfig(config);
          // no redirects
          client.disableRedirectHandling();
          // set custom ua
          client.setUserAgent(userAgent);
          // set the proxy if the user has one set
          if ((System.getProperty("http.proxyHost") != null) && (System.getProperty("http.proxyPort") != null)) {
              HttpHost proxy = new HttpHost(System.getProperty("http.proxyHost").toString(), Integer.valueOf(System.getProperty("http.proxyPort")));
              client.setProxy(proxy);
          }
          return client.build();
      }
docs: Returns a client with all our selected properties / params.
  
  @param timeout
  - socket timeout to set
  @return client