Title pretty much sums it up, I am trying to intercept a web request and get the request headers.
This is what I tried:
let oldSend = XMLHttpRequest.prototype.send
XMLHttpRequest.prototype.send = function() {
console.log(this.responseHeaders);
return oldSend.apply(this, arguments);
}
This is what I expect:
{"test":"abcd1234"}