mirror of
https://github.com/tenrok/axios.git
synced 2026-05-15 11:59:42 +03:00
Fixing issue with post data
This commit is contained in:
Vendored
+6
-3
File diff suppressed because one or more lines are too long
+5
-2
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user