Created
April 29, 2017 17:14
-
-
Save thash/00e0d6ec85a6b383116a202a4ccef32d 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
var originalOpen = window.XMLHttpRequest.prototype.open, | |
originalSend = window.XMLHttpRequest.prototype.send; | |
function myOpen(method, url, async, user, password) { | |
console.log('console log ---------- myopen'); | |
return originalOpen.apply(this, arguments); | |
} | |
function mySend(data) { | |
console.log('console log ---------- mysend'); | |
return originalSend.apply(this, arguments); | |
} | |
window.XMLHttpRequest.prototype.open = myOpen; | |
window.XMLHttpRequest.prototype.send = mySend; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment