Using WebView setHttpAuthUsernamePassword?

Posted by user246114 on Stack Overflow See other posts from Stack Overflow or by user246114
Published on 2010-04-06T13:19:58Z Indexed on 2010/04/06 13:23 UTC
Read the original article Hit count: 831

Filed under:
|

Hi,

I'm trying to do basic authentication to view a protected url. I want to access the protected url which looks like this:

http://api.test.com/userinfo/vid?=1234

So I do the following with a WebView:

mWebView.setHttpAuthUsernamePassword("api.test.com", "", "john", "password123");
mWebView.loadUrl("http://api.test.com/userinfo/vid?=1234");

but the authentication doesn't seem to work, I'm just getting an output error page. Am I using the WebView method correctly here?

Thanks

© Stack Overflow or respective owner

Related posts about android

Related posts about android-sdk