HttpGet httpGet = new HttpGet(url);
SSLContext sslcontext = SSLContexts.custom()
.loadTrustMaterial(TrustSelfSignedStrategy.INSTANCE).build();
RequestConfig requestConfig = RequestConfig.custom().setConnectTimeout(3000)
.setConnectionRequestTimeout(3000).setSocketTimeout(3000).build();
CloseableHttpClient httpclient = HttpClients.custom().setSSLContext(sslcontext)
.setSSLHostnameVerifier(new MyHostnameVerifier())
.setDefaultRequestConfig(requestConfig).build();
CloseableHttpResponse response = httpclient.execute(httpGet);