Skip to content

Instantly share code, notes, and snippets.

@russelldb
Created December 16, 2011 10:01
Show Gist options
  • Select an option

  • Save russelldb/1485435 to your computer and use it in GitHub Desktop.

Select an option

Save russelldb/1485435 to your computer and use it in GitHub Desktop.
Set proxy on Riak HTTP Client
ThreadSafeClientConnManager cm = new ThreadSafeClientConnManager();
HttpClient c = new DefaultHttpClient(cm);
HttpHost proxy = new HttpHost($YOUR_PROXY_HOST, $YOUR_PROXY_PORT);
c.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
HTTPClientConfig conf = new HTTPClientConfig.Builder().withHttpClient(c).build();
return RiakFactory.newClient(conf);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment