提交 28073866 编写于 作者: M Matt Zabriskie

Fixing issue with post data

上级 9c2528d9
此差异已折叠。
......@@ -17,7 +17,10 @@ function axios(options) {
}
function onerror() {
reject(new Error('Can\'t connect to ' + JSON.stringify(options.url)));
reject(
parse(request.responseText) ||
new Error('Can\'t connect to ' + JSON.stringify(options.url))
);
}
try {
......@@ -44,7 +47,7 @@ function axios(options) {
reject(e);
}
request.send(options.data || null);
request.send(options.data ? JSON.stringify(options.data) : null);
});
promise.success = function (fn) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册