BOX JAVA SDK: 1.0.0: Adding proxy settings to to BoxAPIConnection -


im evaluating updating our box client code box-java-sdk-v2 latest version 1.0.0 , don't see way add proxy boxapiconnection.

http://opensource.box.com/box-java-sdk/javadoc/com/box/sdk/boxapiconnection.html

here snippet of how v2 boxclient worked:

//add proxy if configured iboxrestclient restclient = new boxrestclient() {         @override         public httpclient getrawhttpclient() {             httphost proxy = new httphost(config.getproxyhost(), config.getproxyport());             defaultproxyrouteplanner routeplanner = new defaultproxyrouteplanner(proxy);             closeablehttpclient httpclient = httpclients.custom()                     .setrouteplanner(routeplanner)                     .build();             return httpclient;         } };  if(config.isuseproxy()){         logger.info("configuring box sdk client use proxy: " + config.getproxyhost() + " : " + config.getproxyport());         boxclient = new boxclient(config.getboxclienttoken(), config.getboxclientsecrettoken(), null, null, restclient, (new boxconfigbuilder()).build()); }else{         logger.info("configuring box sdk client no proxy");         boxclient = new boxclient(config.getboxclienttoken(), config.getboxclientsecrettoken(), null, null, (new boxconfigbuilder()).build()); } // authentication of our box client boxclient.authenticate(boxtoken); 

there methods, setproxy(), setproxyusername() in boxapiconnection use case. try using them instead.


Comments