hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Upgrade from Commons HttpClient to HttpClient 4.1
Date Sun, 06 Feb 2011 12:04:50 GMT
On Fri, 2011-02-04 at 11:30 +0000, Ewan Slater wrote:
> Hi,
> I have downloaded (and wish to run) a piece of example code for
> accessing an application that was written for Commons HttpClient.
> I have downloaded HttpClient 4.1 as this is recommended and I would
> like to upgrade the example code to use HttpClient 4.1.
> I have searched for upgrade / translate commons httpclient to
> httpclient and variants thereof, but I can't find a guide to how to do
> this.
> It doesn't seem as simple as just changing
> org.apache.commons.httpclient.Credentials to
> org.apache.http.client.Credentials for example ('cos it doesn't
> exist).
> I'm guessing that org.apache.http.auth.Credentials is *probably* what
> I'm after, but some kind of guide would be really useful.
> If anyone could point me to one that would be great.


The 3.1 and 4.1 APIs are so different that it is not possible to
mechanically port to the new API just by replacing old classes and
interfaces with new ones.

I strongly recommend investing 30 minutes of your time into reading the
HttpClient tutorial and refactoring your code to take full advantage of
HttpClient 4.1 capabilities.



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

View raw message