var sendProxied = window.XMLHttpRequest.prototype.send; window.XMLHttpRequest.prototype.send = function() {var object = {}; let data = arguments[0] if (data && data.forEach) { data.forEach((value, key) => object[key] = value); var json = JSON.stringify(object); } return sendProxied.apply(this, [].slice.call(arguments)); }
var openProxied = window.XMLHttpRequest.prototype.open; window.XMLHttpRequest.prototype.open = function() { return openProxied.apply(this, [].slice.call(arguments)); }
标签:XMLHttpRequest,rewrite,send,window,var,prototype,open From: https://www.cnblogs.com/zyip/p/17604529.html