Created
April 12, 2012 17:21
-
-
Save devnulled/2369299 to your computer and use it in GitHub Desktop.
Using Commons HTTP Client 3.1 With a Proxy + SSL Self Generated Certificate
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Protocol easyhttps = new Protocol("https", (ProtocolSocketFactory)new EasySSLProtocolSocketFactory(), 443); | |
| Protocol.registerProtocol("https", easyhttps); | |
| HttpClient client = new HttpClient(); | |
| HostConfiguration config = client.getHostConfiguration(); | |
| config.setProxy("localhost", 8888); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment