code: protected static HttpClient httpClient() throws Exception {
      return HttpClients.custom()
          .setHostnameVerifier(new AllowAllHostnameVerifier())
          .setSslcontext(SSLContexts.custom()
              .loadTrustMaterial(null, new TrustStrategy() {
                @Override
                public boolean isTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException {
                  return true;
                }
              })
              .build())
          .build();
    }
docs: Sets the Commons HttpComponents to accept all SSL Certificates.
  
  @throws Exception
  @return An instance of HttpClient that will accept all.