Created
September 19, 2022 14:13
-
-
Save yathindrak/e55ce3628539fa1a33e244d3e620cd77 to your computer and use it in GitHub Desktop.
This file contains 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
let oldXHROpen = window.XMLHttpRequest.prototype.open; | |
window.XMLHttpRequest.prototype.send = function() { | |
this.addEventListener("send", function() { | |
const responseBody = this.responseText; | |
console.log(`Response Body: ${responseBody}`); | |
}); | |
return oldXHROpen.apply(this, arguments); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment