http requests behind a proxy fails
Posted: 16 Jun 2016, 12:32
I originally asked a question in support regarding proxies (http://forum.madsonic.org/viewtopic.php?f=62&t=1828)
Seems this is a genuine bug, so I'm reporting it here also.
Calls to HttpGet should be passed a proxy via the RequestCofig object.
Thanks
Seems this is a genuine bug, so I'm reporting it here also.
Calls to HttpGet should be passed a proxy via the RequestCofig object.
Code: Select all
HttpGet method = new HttpGet(url);
HttpHost proxy = new HttpHost(httpProxy, httpProxyPort, "http");
RequestConfig requestConfig = RequestConfig.custom()
.setProxy(proxy)
.setSocketTimeout(timeout)
.setConnectTimeout(timeout)
.setConnectionRequestTimeout(timeout)
.build();
method.setConfig(requestConfig);