var setRequestHeader = XMLHttpRequest.prototype.setRequestHeader;
XMLHttpRequest.prototype.setRequestHeader = function(key, value) {
console.log(arguments); //Authorization: NPTlRSQUNUIiwiUk... и Accept: application/json, text/plain
setRequestHeader.call(this, key, value);
}
var setRequestHeader = XMLHttpRequest.prototype.setRequestHeader;
var header;
XMLHttpRequest.prototype.setRequestHeader = function(key, value) {
header = arguments;
setRequestHeader.call(this, key, value);
}
console.log(header); //Получаю только последние, а именно: Accept: application/json, text/plain
console.warn(this.getAllResponseHeaders());