code: private void initializeHTTPClient() {
  
      if (_config.isHTTPSConfigured()) {
        try {
          KeyStore trustKeystore = getClientTruststore();
          SSLContext sslContext = SSLContexts.custom()
              .loadTrustMaterial(trustKeystore, new TrustSelfSignedStrategy())
              .build();
  
          SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE);
  
          // Allow both HTTP and HTTPS connections
          Registry<ConnectionSocketFactory> r = RegistryBuilder.<ConnectionSocketFactory> create()
              .register("http", PlainConnectionSocketFactory.INSTANCE)
              .register("https", sslsf)
              .build();
  
          HttpClientConnectionManager cm = new PoolingHttpClientConnectionManager(r);
  
          httpClient = HttpClients.custom()
              .setConnectionManager(cm)
              .build();
  
        } catch (Exception e) {
          LOGGER.error( "Issue creating HTTP client using supplied configuration. Proceeding with default non-SSL client.", e);
          httpClient = HttpClients.createDefault();
        }
      } else {
  
        httpClient = HttpClients.createDefault();
      }
    }
docs: Create HTTP Client.