hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kalnichevski, Oleg" <oleg.kalnichev...@bearingpoint.com>
Subject RE: Let's face it: HttpClient API is more complex that it could have been
Date Thu, 12 Dec 2002 17:35:14 GMT
Justin

This is one of the viable solutions to the API complexity problem. We should probably consider
providing an LWP-inspired (so to speak) or LWP-like convenience wrapper for the forthcoming
release. Later on it would be easier to handle backward compatibility issues if we had a higher
level API which would remain very stable. Breaking compatibility at a lower API level would
not be that dramatic, as most of the ordinary users would be shielded form it by the LWP layer

This said, I still strongly believe that HttpMethod & HttpMethodBase refactoring would
prove a better solution in the long run

Regards

Oleg

-----Original Message-----
From: Justin Bedard [mailto:juice@lerch.org]
Sent: Thursday, December 12, 2002 17:47
To: Commons HttpClient Project
Subject: Re: Let's face it: HttpClient API is more complex that it could
have been



Myself and a colluege is using HttpClient.  We both have a pretty 
extensive background in Perl.  We've written our own interface on top of 
HttpClient so that all the calls are exactly like LWP:

UserAgent ua = new UserAgent();
ua.request("GET","www.apache.org",80,"/");
String response = ua.getResponseBodyAsString();

You can also pass it proxy parameters, query parameters, etc.  You can 
also access all the stuff (Headers, Cookies, etc.) behind the scenes if 
you want.  But it's very simple and very logical esepcially since we've 
been using this interface for so long (5+ years).

If you'd like help in this direction, I should be able to spare some time.

Justin

otisg wrote:
> Perl has something called LWP (libwww). 
> Perhaps the interface of HttpClient should
> be more like LWP's, which is very logical,
> simple, and has been used for 5+ years.
> 
> Otis


--
To unsubscribe, e-mail:   <mailto:commons-httpclient-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-httpclient-dev-help@jakarta.apache.org>


Mime
View raw message