Created
December 6, 2021 22:24
-
-
Save ilyaglow/3926a568155425a0b42754d4125b003b to your computer and use it in GitHub Desktop.
Intercepting XMLHttpRequest.send call by overwriting it's prototype
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (send) { | |
XMLHttpRequest.prototype.send = function (body) { | |
console.log(body) | |
send.call(this, body) | |
} | |
})(XMLHttpRequest.prototype.send); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment