Hello,
Are there any howto's about the usage of this package? I can only find
the API, but some examples are always more clear.
And why aren't the proxy settings not used by the package?
I now made this method to create the HostConfiguration, but it would be
nice if it's in the package automaticly.
private static HostConfiguration getHostConfiguration(
String host, String protocol) {
String propNameHost = "proxyHost";
String propNamePort = "proxyPort";
String proxyHost =
System.getProperty(protocol+"."+propNameHost);
Integer proxyPortInt =
Integer.getInteger(protocol+"."+propNameHost);
if(proxyHost == null && proxyPortInt == null) {
// Fall back if the properties do not exist.
proxyHost = System.getProperty(propNameHost);
proxyPortInt = Integer.getInteger(propNamePort);
}
HostConfiguration config = new HostConfiguration();
config.setHost(host, -1, protocol); // Use default port.
if (proxyHost != null && proxyPortInt != null) {
int proxyPort = proxyPortInt.intValue();
config.setProxy(proxyHost, proxyPort);
}
return config;
}
And is it needed to make a HostConfiguration by hand?
Can't I just do:
HttpClient hc = new HttpClient();
hc.executeMethod("http://bla1.bla/bla/bla");
hc.executeMethod("http://bla2.bla/bla/bla");
hc.executeMethod("http://bla3.bla/bla/bla");
And that the HostConfiguration is used internaly in HttpClient in stead
of made by me.
I now have to do the bookkeeping of all the hosts I connect with myself
and it would be nice if that is all handled automaticly by httpClient.
Just my to cents.
I'm willing to write some code for this, but I don't wont to change the
API, if other developers don't agree with it.
Greetings,
Ronald.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
- Re: proxy and howto's and some questions. Ronald Klop
- Re: proxy and howto's and some questions. Michael Becke
- Re: proxy and howto's and some questions. Adrian Sutton
- RE: proxy and howto's and some questions. Nick Coleman
- Re: proxy and howto's and some questions. Ortwin Glück
- Re: proxy and howto's and some questions. Adrian Sutton
- What about optional components? Oleg Kalnichevski
- Re: What about optional components... Michael Becke
- Re: What about optional compon... Jeffrey Dever
- Re: What about optional co... Oleg Kalnichevski
- Re: What about optional co... Jeffrey Dever