On Feb 9, 2008, at 4:29 PM, David M. Lloyd wrote:

Mike Heath wrote:
I like the idea of specifying a base URI for the HttpClient. So you use
a base URI of something like "http://somedomain.foo"; and subsequent
requests could then do something like get("/bar") which would do a GET
on "http://somedomain.foo/bar";.
This would require further abstraction than what AHC has to offer currently.

Also, think about virtual hosts. You may have 10 different hostnames that all connect to the same physical host. In this case you still need to specify the full URL per request. Also, proxies and load-balancers have this same requirement - furthermore, in a load-balancing situation, you may even need to make requests with (for example) a scheme of "https" to a non-SSL host. So
this should be designed with the maximum flexibility possible.


Not sure if you're arguing for putting a URL in the constructor as well as the request. All the above scenarios are cleanly handled w/ URLs.


Regards,
Alan

Reply via email to