Alan D. Cabrera wrote:

<snip>

>> That's a good thought.  The reason that the URL was originally put in the
>> HttpClient constructor (as well as the request) was to allow the
>> management
>> of connections to be separated from the URL request.  Realistically, a
>> URL
>> could be dropped in favor of discrete scheme/hostname/port parameters on
>> an connection object.  Though it's not always desirable to do this, so
>> specifying and maintaining a physical connection should be an optional
>> kind
>> of thing to do.
> 
> Not sure why one needs to specify the URL so far in advance.

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.

-Mike

<snip>

Reply via email to