On Fri, Jul 2, 2010 at 7:55 AM, nomi <[email protected]> wrote:
> I have set below code before calling url for http basic authentication
> but it is not working.
>
> Authenticator.setDefault(new Authenticator(){
>                    protected PasswordAuthentication
> getPasswordAuthentication() {
>                        return new
> PasswordAuthentication("admin","admin".toCharArray());
>                    }});
>
> Can someone quote working code of http basic authentication?

http://svn.apache.org/repos/asf/httpcomponents/httpclient/tags/4.0.1/httpclient/src/examples/org/apache/http/examples/client/ClientPreemptiveBasicAuthentication.java

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to