Mike Heath wrote:
Rick McGuire wrote:
The one feature I like about the AHC client that appears to be missing
here is the higher-level abstraction of an HTTP request. The one
drawback of doing everything with URLs is the requirement that the user
of the client needs to be responsible for encoding all of the parameter
information in the URL. In the AHC approach, a request is configured as
an operation to a particular address and additional specifics of the
operation are attached to the request (parameters, credentials needed
for authentication, proxy configuration etc.). The AHC client then uses
that information to handle the URL encoding, authentication challenges,
proxy connection, etc. There are times where a straighforward "fetch me
this URL mode" is sufficient. There are other situations where that
becomes awkward to use.
Thanks for the feedback Rick. That's one of the issues I've been going
back and forth on. In the HttpConnection interface, you have no choice
but to build and send an HttpRequest manually. So you have some
flexibility there. I've been debating whether or not to put support for
sending a raw HttpRequest in the 'simplified' HttpClient. I've been
leaning toward add that functionality to the HttpClient your reply is
making me lean even further in that direction.
-Mike
Yes, it is a bit of a balancing act. After a certain point, it becomes
difficult to continue adding all of the possibilities to the method
signatures. I think a good balance point is to support having a request
object that's got all of the bells and whistles and a few methods that
handle the most typical use scenarios (but in the end, are just creating
the same type of request object on the caller's behalf).
Rick
Rick
Mike Heath wrote:
I posted some use cases here:
http://cwiki.apache.org/confluence/display/AWEB/ClientUseCases They
still need some refinement to properly convey what I want but they're a
decent start.
I've also posted a hypothetical AsyncWeb Client API at
http://swamp.homelinux.net/mina/asyncweb/client/api/ with the intent to
further promote discussion and foster more innovative ideas. I would
love to here some feedback on this API. What do you like, dislike, not
understand? Where do you see room for improvement? The API is really
rough in places but for the most part it conveys the ideas I've had over
the past week or so. Any suggestions for name changes to classes and/or
methods are welcome.
-Mike