How to pass user and password for basic HTTP Authentication in URL

 it is possible to pass user and password in a URL to be able to access a restricted area. The format to be used is
http://username:password@example.com

Unfortunately this does not work for all Android versions. I tested that on HTC Desire running Android 2.2 and Nexus 5 running Android 4.2.2 and it worked. It did not work on Samsung Galaxy Tab 10.1N running Android 3.2.



An example how to download a file from a restricted area you can find here.

Comments