How to implement basic auth view log:pass@host?

Trying to do authorization using phantom
Send a header
page.customHeaders = {
 'Authorization': 'Basic' + btoa('user:pass');
};

After trying to get the hash, but returns always the same regardless of what I entered
page.onResourceRequested = function (requestData) {
console.log(JSON.stringify(requestData.headers));
};
June 10th 19 at 15:53
0 answer

Find more questions by tags JavaScriptPhantomJS