alt text http://img834.imageshack.us/img834/2905/browserproblem.png
Can I disable it and how?
The problem is you're not Base64-encoding the username (ie, authentication token) and (dummy) password you're sending (which is a requirement of the HTTP Basic authentication scheme). Here's roughly what your code ought to look like:
var xhr = new XMLHttpRequest();
xhr.open('GET', 'http://onsip.highrisehq.com/account.xml');
xhr.setRequestHeader('Authorization', 'Basic ' + btoa(token + ':'));
xhr.onreadystatechange = function() { console.log(xhr.responseText); };
xhr.send();
(I swapped in 'onsip'
as the subdomain for you, but you still need to replace token
with your authentication token.)
I know two ways one can do this in Firefox XUL code (but not web code), one of which I know doesn't apply to Google chrome, and a quick test seems to indicate the other doesn't either.
Three options occur to me.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.