public void setHTTPProxy ( String host , int port , List < String > noProxyHosts ) { proxyConfig = new ProxyConfig ( ) ; proxyConfig . setProxyHost ( host ) ; proxyConfig . setProxyPort ( port ) ; if ( noProxyHosts != null && noProxyHosts . size ( ) > 0 ) { for ( String noProxyHost : noProxyHosts ) { proxyConfig . addHostsToProxyBypass ( noProxyHost ) ; } } getWebClient ( ) . getOptions ( ) . setProxyConfig ( proxyConfig ) ; }
Sets HTTP proxy for WebClient with bypass proxy hosts