You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by jamesrusso <jr...@halo3.net> on 2009/10/20 22:53:02 UTC
Re: BasicAuthentication using HttpClient 4.0
Hello,
This does not seem to be a correct example for 4.0? Can anyone provide an
example of the proper way to do basic authentication in 4.0?
thanks,
-jr
olegk wrote:
>
>
> While this certainly does the trick for BASIC authentication, more
> complex schemes will not work that way.
>
> This is the recommended way of handling authentication with HttpClient
> 4.0:
>
> http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientAuthentication.java
> http://hc.apache.org/httpcomponents-client/tutorial/html/authentication.html
>
>
--
View this message in context: http://www.nabble.com/BasicAuthentication-using-HttpClient-4.0-tp25578027p25982351.html
Sent from the HttpClient-User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org
Re: BasicAuthentication using HttpClient 4.0
Posted by jamesrusso <jr...@halo3.net>.
Sorry for the noise. I was using "HttpClient" as my client (holding an
instance of DefaultHttpClient), but I now realize that I need
DefaultHttpClient to expose the setCredentialProvider method.
thanks,
-jr
jamesrusso wrote:
>
> Hello,
>
> This does not seem to be a correct example for 4.0? Can anyone provide an
> example of the proper way to do basic authentication in 4.0?
>
> thanks,
>
> -jr
>
>
> olegk wrote:
>>
>>
>> While this certainly does the trick for BASIC authentication, more
>> complex schemes will not work that way.
>>
>> This is the recommended way of handling authentication with HttpClient
>> 4.0:
>>
>> http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/httpclient/src/examples/org/apache/http/examples/client/ClientAuthentication.java
>> http://hc.apache.org/httpcomponents-client/tutorial/html/authentication.html
>>
>>
>
>
--
View this message in context: http://www.nabble.com/BasicAuthentication-using-HttpClient-4.0-tp25578027p25982392.html
Sent from the HttpClient-User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org