Hello,
Is it possible somehow to disable using proxy in HTTPClient, if it already
has set before? Maybe assign null, which is not allowed by superclass?
Here is sample:
HttpClient client = new HttpClient();
try {
HostConfiguration config = client.getHostConfiguration();
config.setProxy('proxy.myorg.net', 3128);
client.setHostConfiguration(config);
// do something
config.setProxy(null, -1); \\ <-----
Exception was raised in this line
client.setHostConfiguration(config);
} finally {
}
resulted:
null
-1
Exception in thread "main" java.lang.IllegalArgumentException: Host name may
not be null