XMLHttpRequest fails basic authentication
问题 Any idea why XMLHttpRequest with correct credentials in Pebble JS Framework fails basic authentication on Android but works in iOS? Exactly the same code, along the lines of: var req = new XMLHttpRequest(); req.open(method, url, true, user, pass); req.send(data); req.onreadystatechange = function() { ... } Returns 401 in from Android Pebble app, but authenticates correctly in iOS. 回答1: I found a workaround that worked for me on Android. Don’t know why but direct authenticated request: req