提交 1aa4bbff 编写于 作者: M Mislav Marohnić

Fix sending requests with empty body such as DELETE in IE

If the body passed to `xhr.send()` is `undefined`, the text sent would
literally be "undefined" on IE.
上级 6746b891
......@@ -202,6 +202,8 @@
if (isObject(self.body)) {
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8')
body = encode(self.body)
} else if (body === undefined) {
body = null
}
xhr.send(body)
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册