I want to check if the URL is protected by basic Http authentication using javascript. Here is what I still have:
function showFailure(){ alert("FAILED ") }
function showSuccess(){ alert("SUCCESS") }
var myRequest = new Request({
url: 'http://localhost/access_protected_HTTP_BASIC',
method: 'get',
onSuccess: showSuccess,
onFailure: showFailure
}).send();
But it does open a browser login popup to access the resource. Is there a way to not trigger this popup?
Thank!
Note. I use mootools in this example, but I would take any javascript example that does the trick :)
source
share