Reputation: 173
I have some code that uses HttpClient version 3. I would like to come up with a version 4 equivalent. I believe 4.0 but any version 4 would be helpful.
ProtocolSocketFactory psf = myObj.getPSF();
httpClient.getHostConfiguration().setHost(host, port, new Protocol("http", psf, 80));
Upvotes: 1
Views: 1441
Reputation: 173
I have solved this by adding a scheme and making my own SchemeSocketFactory.
Scheme myScheme = new Scheme("https", port, new MySchemeSocketFactory());
httpClient.getConnectionManager().getSchemeRegistry().register(myScheme);
Upvotes: 1