mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
Releasing 0.17.0
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "axios",
|
"name": "axios",
|
||||||
"main": "./dist/axios.js",
|
"main": "./dist/axios.js",
|
||||||
"version": "0.16.2",
|
"version": "0.17.0",
|
||||||
"homepage": "https://github.com/axios/axios",
|
"homepage": "https://github.com/axios/axios",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Matt Zabriskie"
|
"Matt Zabriskie"
|
||||||
|
|||||||
Vendored
+80
-63
@@ -1,4 +1,4 @@
|
|||||||
/* axios v0.16.2 | (c) 2017 by Matt Zabriskie */
|
/* axios v0.17.0 | (c) 2017 by Matt Zabriskie */
|
||||||
(function webpackUniversalModuleDefinition(root, factory) {
|
(function webpackUniversalModuleDefinition(root, factory) {
|
||||||
if(typeof exports === 'object' && typeof module === 'object')
|
if(typeof exports === 'object' && typeof module === 'object')
|
||||||
module.exports = factory();
|
module.exports = factory();
|
||||||
@@ -53,13 +53,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
/************************************************************************/
|
/************************************************************************/
|
||||||
/******/ ([
|
/******/ ([
|
||||||
/* 0 */
|
/* 0 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
module.exports = __webpack_require__(1);
|
module.exports = __webpack_require__(1);
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 1 */
|
/* 1 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -115,9 +115,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
module.exports.default = axios;
|
module.exports.default = axios;
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 2 */
|
/* 2 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -424,9 +424,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 3 */
|
/* 3 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -441,9 +441,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 4 */
|
/* 4 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Determine if an object is a Buffer
|
* Determine if an object is a Buffer
|
||||||
@@ -468,9 +468,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 5 */
|
/* 5 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -478,8 +478,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
var utils = __webpack_require__(2);
|
var utils = __webpack_require__(2);
|
||||||
var InterceptorManager = __webpack_require__(17);
|
var InterceptorManager = __webpack_require__(17);
|
||||||
var dispatchRequest = __webpack_require__(18);
|
var dispatchRequest = __webpack_require__(18);
|
||||||
var isAbsoluteURL = __webpack_require__(21);
|
|
||||||
var combineURLs = __webpack_require__(22);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new instance of Axios
|
* Create a new instance of Axios
|
||||||
@@ -511,11 +509,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
config = utils.merge(defaults, this.defaults, { method: 'get' }, config);
|
config = utils.merge(defaults, this.defaults, { method: 'get' }, config);
|
||||||
config.method = config.method.toLowerCase();
|
config.method = config.method.toLowerCase();
|
||||||
|
|
||||||
// Support baseURL config
|
|
||||||
if (config.baseURL && !isAbsoluteURL(config.url)) {
|
|
||||||
config.url = combineURLs(config.baseURL, config.url);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hook up interceptors middleware
|
// Hook up interceptors middleware
|
||||||
var chain = [dispatchRequest, undefined];
|
var chain = [dispatchRequest, undefined];
|
||||||
var promise = Promise.resolve(config);
|
var promise = Promise.resolve(config);
|
||||||
@@ -560,9 +553,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
module.exports = Axios;
|
module.exports = Axios;
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 6 */
|
/* 6 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -658,9 +651,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
module.exports = defaults;
|
module.exports = defaults;
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 7 */
|
/* 7 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -676,9 +669,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 8 */
|
/* 8 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -706,7 +699,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
// For IE 8/9 CORS support
|
// For IE 8/9 CORS support
|
||||||
// Only supports POST and GET calls and doesn't returns the response headers.
|
// Only supports POST and GET calls and doesn't returns the response headers.
|
||||||
// DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.
|
// DON'T do this for testing b/c XMLHttpRequest is mocked, not XDomainRequest.
|
||||||
if (("production") !== 'test' &&
|
if (!window.XMLHttpRequest &&
|
||||||
|
("production") !== 'test' &&
|
||||||
typeof window !== 'undefined' &&
|
typeof window !== 'undefined' &&
|
||||||
window.XDomainRequest && !('withCredentials' in request) &&
|
window.XDomainRequest && !('withCredentials' in request) &&
|
||||||
!isURLSameOrigin(config.url)) {
|
!isURLSameOrigin(config.url)) {
|
||||||
@@ -748,7 +742,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
|
var responseData = !config.responseType || config.responseType === 'text' ? request.responseText : request.response;
|
||||||
var response = {
|
var response = {
|
||||||
data: responseData,
|
data: responseData,
|
||||||
// IE sends 1223 instead of 204 (https://github.com/mzabriskie/axios/issues/201)
|
// IE sends 1223 instead of 204 (https://github.com/axios/axios/issues/201)
|
||||||
status: request.status === 1223 ? 204 : request.status,
|
status: request.status === 1223 ? 204 : request.status,
|
||||||
statusText: request.status === 1223 ? 'No Content' : request.statusText,
|
statusText: request.status === 1223 ? 'No Content' : request.statusText,
|
||||||
headers: responseHeaders,
|
headers: responseHeaders,
|
||||||
@@ -862,9 +856,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 9 */
|
/* 9 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -894,9 +888,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 10 */
|
/* 10 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -918,9 +912,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 11 */
|
/* 11 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -945,9 +939,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 12 */
|
/* 12 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -1019,14 +1013,23 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 13 */
|
/* 13 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
var utils = __webpack_require__(2);
|
var utils = __webpack_require__(2);
|
||||||
|
|
||||||
|
// Headers whose duplicates are ignored by node
|
||||||
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
||||||
|
var ignoreDuplicateOf = [
|
||||||
|
'age', 'authorization', 'content-length', 'content-type', 'etag',
|
||||||
|
'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
|
||||||
|
'last-modified', 'location', 'max-forwards', 'proxy-authorization',
|
||||||
|
'referer', 'retry-after', 'user-agent'
|
||||||
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Parse headers into an object
|
* Parse headers into an object
|
||||||
*
|
*
|
||||||
@@ -1054,7 +1057,14 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
val = utils.trim(line.substr(i + 1));
|
val = utils.trim(line.substr(i + 1));
|
||||||
|
|
||||||
if (key) {
|
if (key) {
|
||||||
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (key === 'set-cookie') {
|
||||||
|
parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
|
||||||
|
} else {
|
||||||
|
parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1062,9 +1072,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 14 */
|
/* 14 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -1136,9 +1146,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 15 */
|
/* 15 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -1178,9 +1188,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
module.exports = btoa;
|
module.exports = btoa;
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 16 */
|
/* 16 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -1237,9 +1247,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 17 */
|
/* 17 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -1295,9 +1305,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
module.exports = InterceptorManager;
|
module.exports = InterceptorManager;
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 18 */
|
/* 18 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -1305,6 +1315,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
var transformData = __webpack_require__(19);
|
var transformData = __webpack_require__(19);
|
||||||
var isCancel = __webpack_require__(20);
|
var isCancel = __webpack_require__(20);
|
||||||
var defaults = __webpack_require__(6);
|
var defaults = __webpack_require__(6);
|
||||||
|
var isAbsoluteURL = __webpack_require__(21);
|
||||||
|
var combineURLs = __webpack_require__(22);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Throws a `Cancel` if cancellation has been requested.
|
* Throws a `Cancel` if cancellation has been requested.
|
||||||
@@ -1324,6 +1336,11 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
module.exports = function dispatchRequest(config) {
|
module.exports = function dispatchRequest(config) {
|
||||||
throwIfCancellationRequested(config);
|
throwIfCancellationRequested(config);
|
||||||
|
|
||||||
|
// Support baseURL config
|
||||||
|
if (config.baseURL && !isAbsoluteURL(config.url)) {
|
||||||
|
config.url = combineURLs(config.baseURL, config.url);
|
||||||
|
}
|
||||||
|
|
||||||
// Ensure headers exist
|
// Ensure headers exist
|
||||||
config.headers = config.headers || {};
|
config.headers = config.headers || {};
|
||||||
|
|
||||||
@@ -1380,9 +1397,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 19 */
|
/* 19 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -1406,9 +1423,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 20 */
|
/* 20 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -1417,9 +1434,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 21 */
|
/* 21 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -1437,9 +1454,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 22 */
|
/* 22 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -1457,9 +1474,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 23 */
|
/* 23 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -1482,9 +1499,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
module.exports = Cancel;
|
module.exports = Cancel;
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 24 */
|
/* 24 */
|
||||||
/***/ function(module, exports, __webpack_require__) {
|
/***/ (function(module, exports, __webpack_require__) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -1545,9 +1562,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
module.exports = CancelToken;
|
module.exports = CancelToken;
|
||||||
|
|
||||||
|
|
||||||
/***/ },
|
/***/ }),
|
||||||
/* 25 */
|
/* 25 */
|
||||||
/***/ function(module, exports) {
|
/***/ (function(module, exports) {
|
||||||
|
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
@@ -1578,7 +1595,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/***/ }
|
/***/ })
|
||||||
/******/ ])
|
/******/ ])
|
||||||
});
|
});
|
||||||
;
|
;
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+3
-3
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "axios",
|
"name": "axios",
|
||||||
"version": "0.16.2",
|
"version": "0.17.0",
|
||||||
"description": "Promise based HTTP client for the browser and node.js",
|
"description": "Promise based HTTP client for the browser and node.js",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Reference in New Issue
Block a user