HttpClient 4.3.x, fixing deprecated code to use current HttpClient implementations
问题 I had the following code, which still compiles, but they're all deprecated: 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()); I tried my