You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Sagi Mann <sa...@googlemail.com> on 2007/10/21 16:56:41 UTC

getHostConfiguration

Hello,
AFAIK, it is the HttpMethod instances, through multiple
HttpConnections, that connect to various hosts. If so, could anyone
pls explain what is HttpClient.getHostConfiguration used for? After
all, an HttpClient shouldn't be associated with any specific host,
correct?

thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Re: getHostConfiguration

Posted by Roland Weber <os...@dubioso.net>.
Hello,

> AFAIK, it is the HttpMethod instances, through multiple
> HttpConnections, that connect to various hosts. If so, could anyone
> pls explain what is HttpClient.getHostConfiguration used for? After
> all, an HttpClient shouldn't be associated with any specific host,
> correct?


Every connection is made based on a HostConfiguration, which tells
HttpClient what proxy to use or what local address. Also, you can
create a method with a relativ URL that doesn't specify the host.
The HostConfiguration in the HttpClient is the default host config
for relative URLs.

hope that helps,
  Roland

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org