Skip to content

Instantly share code, notes, and snippets.

@devnulled
Created April 12, 2012 17:21
Show Gist options
  • Select an option

  • Save devnulled/2369299 to your computer and use it in GitHub Desktop.

Select an option

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
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