title: HttpClient 4.3.x, fixing deprecated code to use current HttpClient implementations
body: <p>I had the following code, which still compiles, but they're all deprecated:</p>
  
  <pre><code>SSLSocketFactory sslSocketFactory = new SSLSocketFactory(context, SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
  ClientConnectionManager clientConnectionManager = base.getConnectionManager();
  SchemeRegistry schemeRegistry = clientConnectionManager.getSchemeRegistry();
  schemeRegistry.register(new Scheme("https", 443, sslSocketFactory));
  return new DefaultHttpClient(clientConnectionManager, base.getParams());
  </code></pre>
  
  <p>I tried my best to replace it with this portion of the code:</p>
  
  <pre><code>HttpClientBuilder builder = HttpClientBuilder.create();
  SSLConnectionSocketFactory sslConnectionFactory = new SSLConnectionSocketFactory(context, SSLConnectionSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);
  builder.setConnectionManager(new BasicHttpClientConnectionManager());
  builder.setSSLSocketFactory(sslConnectionFactory);
  return builder.build();
  </code></pre>
  
  <p>As you can see, there are few lines of code from the top post that I don't know how to include on the new portion. How can I add needed code, such as, an alternate <code>SchemeRegistry</code>?</p>