Using WebView setHttpAuthUsernamePassword?

前端 未结 8 581
死守一世寂寞
死守一世寂寞 2020-11-30 05:45

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?=1         


        
8条回答
  •  自闭症患者
    2020-11-30 06:25

    If you do not mind writing your username and password into the url, then it is not necessary to change your webview client.

    Just open the following url in the webview:

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

提交回复
热议问题