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.
> 

Ewan,

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.

http://hc.apache.org/httpcomponents-core-ga/tutorial/html/  

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to