Former-commit-id: 50e08bb3fb1b893d05ede1a112937243a71cd61b
This commit is contained in:
FairyEver
2019-11-23 13:19:00 +08:00
parent df2e4d1e46
commit 810f2eb69f
3 changed files with 944 additions and 777 deletions
+4 -1
View File
@@ -2,7 +2,10 @@ export default function (Mock) {
// http://cnine.me/note/FrontEnd/mock-lose-cookies-dbg.html
Mock.XHR.prototype.__send = Mock.XHR.prototype.send
Mock.XHR.prototype.send = function () {
if (this.custom.xhr) this.custom.xhr.withCredentials = this.withCredentials || false
if (this.custom.xhr) {
this.custom.xhr.withCredentials = this.withCredentials || false
this.custom.xhr.responseType = this.responseType
}
this.__send.apply(this, arguments)
}
}