Created
October 3, 2024 17:57
-
-
Save vczb/0bd8aaca3b628857d6bc6e7180827c92 to your computer and use it in GitHub Desktop.
override-post-requests
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
//https://stackoverflow.com/questions/69592467/override-post-requests | |
let send = XMLHttpRequest.prototype.send; | |
XMLHttpRequest.prototype.send = function (body) { | |
const newBody = JSON.parse(body); | |
newBody.id = 304622; | |
send.call(this, JSON.stringify(newBody)); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment