Hi,
I have a problem, with Autthorization header. I think it is removed before sending request. Code I'm using is as follows:
var xhr = new XMLHttpRequest();
xhr.onload = function() {
var json = JSON.parse(xhr.responseText);
console.log(json)
callBack(json)
}
xhr.onerror = function(){
console.log(xhr)
}
xhr.open("POST", fullURL, true);
console.log(login + " " + login + " => Basic " + Base64.encode(login + ":" + password))
xhr.setRequestHeader("Authorization", "Basic " + Base64.encode(login + ":" + password));
xhr.setRequestHeader("A", "Basic " + Base64.encode(login + ":" + password));
xhr.send();Line 11. shows correct login, password and encoding.
When I send request I doesn't have Authorization header included, but header `A` is send normally. Is it bug in implementation XMLHttpRequest?
Ok I see why it is happening:
https://forums.developer.apple.com/message/53809#53809
But I don't see how to solve that.