mirror of
https://github.com/tenrok/axios.git
synced 2026-06-17 19:21:29 +03:00
Releasing 0.19.1
This commit is contained in:
Vendored
+204
-139
@@ -1,4 +1,4 @@
|
||||
/* axios v0.19.0 | (c) 2019 by Matt Zabriskie */
|
||||
/* axios v0.19.1 | (c) 2020 by Matt Zabriskie */
|
||||
(function webpackUniversalModuleDefinition(root, factory) {
|
||||
if(typeof exports === 'object' && typeof module === 'object')
|
||||
module.exports = factory();
|
||||
@@ -65,9 +65,9 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
|
||||
var utils = __webpack_require__(2);
|
||||
var bind = __webpack_require__(3);
|
||||
var Axios = __webpack_require__(5);
|
||||
var mergeConfig = __webpack_require__(22);
|
||||
var defaults = __webpack_require__(11);
|
||||
var Axios = __webpack_require__(4);
|
||||
var mergeConfig = __webpack_require__(23);
|
||||
var defaults = __webpack_require__(10);
|
||||
|
||||
/**
|
||||
* Create an instance of Axios
|
||||
@@ -100,15 +100,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
};
|
||||
|
||||
// Expose Cancel & CancelToken
|
||||
axios.Cancel = __webpack_require__(23);
|
||||
axios.CancelToken = __webpack_require__(24);
|
||||
axios.isCancel = __webpack_require__(10);
|
||||
axios.Cancel = __webpack_require__(24);
|
||||
axios.CancelToken = __webpack_require__(25);
|
||||
axios.isCancel = __webpack_require__(9);
|
||||
|
||||
// Expose all/spread
|
||||
axios.all = function all(promises) {
|
||||
return Promise.all(promises);
|
||||
};
|
||||
axios.spread = __webpack_require__(25);
|
||||
axios.spread = __webpack_require__(26);
|
||||
|
||||
module.exports = axios;
|
||||
|
||||
@@ -123,7 +123,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
'use strict';
|
||||
|
||||
var bind = __webpack_require__(3);
|
||||
var isBuffer = __webpack_require__(4);
|
||||
|
||||
/*global toString:true*/
|
||||
|
||||
@@ -141,6 +140,27 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
return toString.call(val) === '[object Array]';
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if a value is undefined
|
||||
*
|
||||
* @param {Object} val The value to test
|
||||
* @returns {boolean} True if the value is undefined, otherwise false
|
||||
*/
|
||||
function isUndefined(val) {
|
||||
return typeof val === 'undefined';
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if a value is a Buffer
|
||||
*
|
||||
* @param {Object} val The value to test
|
||||
* @returns {boolean} True if value is a Buffer, otherwise false
|
||||
*/
|
||||
function isBuffer(val) {
|
||||
return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
|
||||
&& typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if a value is an ArrayBuffer
|
||||
*
|
||||
@@ -197,16 +217,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
return typeof val === 'number';
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if a value is undefined
|
||||
*
|
||||
* @param {Object} val The value to test
|
||||
* @returns {boolean} True if the value is undefined, otherwise false
|
||||
*/
|
||||
function isUndefined(val) {
|
||||
return typeof val === 'undefined';
|
||||
}
|
||||
|
||||
/**
|
||||
* Determine if a value is an Object
|
||||
*
|
||||
@@ -475,32 +485,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
|
||||
/***/ }),
|
||||
/* 4 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
/*!
|
||||
* Determine if an object is a Buffer
|
||||
*
|
||||
* @author Feross Aboukhadijeh <https://feross.org>
|
||||
* @license MIT
|
||||
*/
|
||||
|
||||
module.exports = function isBuffer (obj) {
|
||||
return obj != null && obj.constructor != null &&
|
||||
typeof obj.constructor.isBuffer === 'function' && obj.constructor.isBuffer(obj)
|
||||
}
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 5 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var utils = __webpack_require__(2);
|
||||
var buildURL = __webpack_require__(6);
|
||||
var InterceptorManager = __webpack_require__(7);
|
||||
var dispatchRequest = __webpack_require__(8);
|
||||
var mergeConfig = __webpack_require__(22);
|
||||
var buildURL = __webpack_require__(5);
|
||||
var InterceptorManager = __webpack_require__(6);
|
||||
var dispatchRequest = __webpack_require__(7);
|
||||
var mergeConfig = __webpack_require__(23);
|
||||
|
||||
/**
|
||||
* Create a new instance of Axios
|
||||
@@ -531,7 +524,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
}
|
||||
|
||||
config = mergeConfig(this.defaults, config);
|
||||
config.method = config.method ? config.method.toLowerCase() : 'get';
|
||||
|
||||
// Set config.method
|
||||
if (config.method) {
|
||||
config.method = config.method.toLowerCase();
|
||||
} else if (this.defaults.method) {
|
||||
config.method = this.defaults.method.toLowerCase();
|
||||
} else {
|
||||
config.method = 'get';
|
||||
}
|
||||
|
||||
// Hook up interceptors middleware
|
||||
var chain = [dispatchRequest, undefined];
|
||||
@@ -583,7 +584,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 6 */
|
||||
/* 5 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
@@ -660,7 +661,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 7 */
|
||||
/* 6 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
@@ -718,17 +719,15 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 8 */
|
||||
/* 7 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var utils = __webpack_require__(2);
|
||||
var transformData = __webpack_require__(9);
|
||||
var isCancel = __webpack_require__(10);
|
||||
var defaults = __webpack_require__(11);
|
||||
var isAbsoluteURL = __webpack_require__(20);
|
||||
var combineURLs = __webpack_require__(21);
|
||||
var transformData = __webpack_require__(8);
|
||||
var isCancel = __webpack_require__(9);
|
||||
var defaults = __webpack_require__(10);
|
||||
|
||||
/**
|
||||
* Throws a `Cancel` if cancellation has been requested.
|
||||
@@ -748,11 +747,6 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
module.exports = function dispatchRequest(config) {
|
||||
throwIfCancellationRequested(config);
|
||||
|
||||
// Support baseURL config
|
||||
if (config.baseURL && !isAbsoluteURL(config.url)) {
|
||||
config.url = combineURLs(config.baseURL, config.url);
|
||||
}
|
||||
|
||||
// Ensure headers exist
|
||||
config.headers = config.headers || {};
|
||||
|
||||
@@ -767,7 +761,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
config.headers = utils.merge(
|
||||
config.headers.common || {},
|
||||
config.headers[config.method] || {},
|
||||
config.headers || {}
|
||||
config.headers
|
||||
);
|
||||
|
||||
utils.forEach(
|
||||
@@ -810,7 +804,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 9 */
|
||||
/* 8 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
@@ -836,7 +830,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 10 */
|
||||
/* 9 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
'use strict';
|
||||
@@ -847,13 +841,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 11 */
|
||||
/* 10 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var utils = __webpack_require__(2);
|
||||
var normalizeHeaderName = __webpack_require__(12);
|
||||
var normalizeHeaderName = __webpack_require__(11);
|
||||
|
||||
var DEFAULT_CONTENT_TYPE = {
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
@@ -867,13 +861,12 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
|
||||
function getDefaultAdapter() {
|
||||
var adapter;
|
||||
// Only Node.JS has a process variable that is of [[Class]] process
|
||||
if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
|
||||
// For node use HTTP adapter
|
||||
adapter = __webpack_require__(13);
|
||||
} else if (typeof XMLHttpRequest !== 'undefined') {
|
||||
if (typeof XMLHttpRequest !== 'undefined') {
|
||||
// For browsers use XHR adapter
|
||||
adapter = __webpack_require__(13);
|
||||
adapter = __webpack_require__(12);
|
||||
} else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
|
||||
// For node use HTTP adapter
|
||||
adapter = __webpack_require__(12);
|
||||
}
|
||||
return adapter;
|
||||
}
|
||||
@@ -951,7 +944,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 12 */
|
||||
/* 11 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
@@ -969,17 +962,18 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 13 */
|
||||
/* 12 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var utils = __webpack_require__(2);
|
||||
var settle = __webpack_require__(14);
|
||||
var buildURL = __webpack_require__(6);
|
||||
var parseHeaders = __webpack_require__(17);
|
||||
var isURLSameOrigin = __webpack_require__(18);
|
||||
var createError = __webpack_require__(15);
|
||||
var settle = __webpack_require__(13);
|
||||
var buildURL = __webpack_require__(5);
|
||||
var buildFullPath = __webpack_require__(16);
|
||||
var parseHeaders = __webpack_require__(19);
|
||||
var isURLSameOrigin = __webpack_require__(20);
|
||||
var createError = __webpack_require__(14);
|
||||
|
||||
module.exports = function xhrAdapter(config) {
|
||||
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
||||
@@ -999,7 +993,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
|
||||
}
|
||||
|
||||
request.open(config.method.toUpperCase(), buildURL(config.url, config.params, config.paramsSerializer), true);
|
||||
var fullPath = buildFullPath(config.baseURL, config.url);
|
||||
request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
|
||||
|
||||
// Set the request timeout in MS
|
||||
request.timeout = config.timeout;
|
||||
@@ -1060,7 +1055,11 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
|
||||
// Handle timeout
|
||||
request.ontimeout = function handleTimeout() {
|
||||
reject(createError('timeout of ' + config.timeout + 'ms exceeded', config, 'ECONNABORTED',
|
||||
var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
|
||||
if (config.timeoutErrorMessage) {
|
||||
timeoutErrorMessage = config.timeoutErrorMessage;
|
||||
}
|
||||
reject(createError(timeoutErrorMessage, config, 'ECONNABORTED',
|
||||
request));
|
||||
|
||||
// Clean up request
|
||||
@@ -1071,10 +1070,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
// This is only done if running in a standard browser environment.
|
||||
// Specifically not if we're in a web worker, or react-native.
|
||||
if (utils.isStandardBrowserEnv()) {
|
||||
var cookies = __webpack_require__(19);
|
||||
var cookies = __webpack_require__(22);
|
||||
|
||||
// Add xsrf header
|
||||
var xsrfValue = (config.withCredentials || isURLSameOrigin(config.url)) && config.xsrfCookieName ?
|
||||
var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
|
||||
cookies.read(config.xsrfCookieName) :
|
||||
undefined;
|
||||
|
||||
@@ -1097,8 +1096,8 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
}
|
||||
|
||||
// Add withCredentials to request if needed
|
||||
if (config.withCredentials) {
|
||||
request.withCredentials = true;
|
||||
if (!utils.isUndefined(config.withCredentials)) {
|
||||
request.withCredentials = !!config.withCredentials;
|
||||
}
|
||||
|
||||
// Add responseType to request if needed
|
||||
@@ -1149,12 +1148,12 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 14 */
|
||||
/* 13 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var createError = __webpack_require__(15);
|
||||
var createError = __webpack_require__(14);
|
||||
|
||||
/**
|
||||
* Resolve or reject a Promise based on response status.
|
||||
@@ -1180,12 +1179,12 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 15 */
|
||||
/* 14 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var enhanceError = __webpack_require__(16);
|
||||
var enhanceError = __webpack_require__(15);
|
||||
|
||||
/**
|
||||
* Create an Error with the specified message, config, error code, request and response.
|
||||
@@ -1204,7 +1203,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 16 */
|
||||
/* 15 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
'use strict';
|
||||
@@ -1251,8 +1250,74 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 16 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var isAbsoluteURL = __webpack_require__(17);
|
||||
var combineURLs = __webpack_require__(18);
|
||||
|
||||
/**
|
||||
* Creates a new URL by combining the baseURL with the requestedURL,
|
||||
* only when the requestedURL is not already an absolute URL.
|
||||
* If the requestURL is absolute, this function returns the requestedURL untouched.
|
||||
*
|
||||
* @param {string} baseURL The base URL
|
||||
* @param {string} requestedURL Absolute or relative URL to combine
|
||||
* @returns {string} The combined full path
|
||||
*/
|
||||
module.exports = function buildFullPath(baseURL, requestedURL) {
|
||||
if (baseURL && !isAbsoluteURL(requestedURL)) {
|
||||
return combineURLs(baseURL, requestedURL);
|
||||
}
|
||||
return requestedURL;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 17 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Determines whether the specified URL is absolute
|
||||
*
|
||||
* @param {string} url The URL to test
|
||||
* @returns {boolean} True if the specified URL is absolute, otherwise false
|
||||
*/
|
||||
module.exports = function isAbsoluteURL(url) {
|
||||
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
||||
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
||||
// by any combination of letters, digits, plus, period, or hyphen.
|
||||
return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 18 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Creates a new URL by combining the specified URLs
|
||||
*
|
||||
* @param {string} baseURL The base URL
|
||||
* @param {string} relativeURL The relative URL
|
||||
* @returns {string} The combined URL
|
||||
*/
|
||||
module.exports = function combineURLs(baseURL, relativeURL) {
|
||||
return relativeURL
|
||||
? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
|
||||
: baseURL;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 19 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
@@ -1311,12 +1376,13 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 18 */
|
||||
/* 20 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var utils = __webpack_require__(2);
|
||||
var isValidXss = __webpack_require__(21);
|
||||
|
||||
module.exports = (
|
||||
utils.isStandardBrowserEnv() ?
|
||||
@@ -1337,6 +1403,10 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
function resolveURL(url) {
|
||||
var href = url;
|
||||
|
||||
if (isValidXss(url)) {
|
||||
throw new Error('URL contains XSS injection attempt');
|
||||
}
|
||||
|
||||
if (msie) {
|
||||
// IE needs attribute set twice to normalize properties
|
||||
urlParsingNode.setAttribute('href', href);
|
||||
@@ -1385,7 +1455,20 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 19 */
|
||||
/* 21 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = function isValidXss(requestURL) {
|
||||
var xssRegex = /(\b)(on\w+)=|javascript|(<\s*)(\/*)script/gi;
|
||||
return xssRegex.test(requestURL);
|
||||
};
|
||||
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 22 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
@@ -1444,47 +1527,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 20 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Determines whether the specified URL is absolute
|
||||
*
|
||||
* @param {string} url The URL to test
|
||||
* @returns {boolean} True if the specified URL is absolute, otherwise false
|
||||
*/
|
||||
module.exports = function isAbsoluteURL(url) {
|
||||
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
||||
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
||||
// by any combination of letters, digits, plus, period, or hyphen.
|
||||
return /^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(url);
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 21 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
'use strict';
|
||||
|
||||
/**
|
||||
* Creates a new URL by combining the specified URLs
|
||||
*
|
||||
* @param {string} baseURL The base URL
|
||||
* @param {string} relativeURL The relative URL
|
||||
* @returns {string} The combined URL
|
||||
*/
|
||||
module.exports = function combineURLs(baseURL, relativeURL) {
|
||||
return relativeURL
|
||||
? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
|
||||
: baseURL;
|
||||
};
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 22 */
|
||||
/* 23 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
@@ -1504,13 +1547,23 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
config2 = config2 || {};
|
||||
var config = {};
|
||||
|
||||
utils.forEach(['url', 'method', 'params', 'data'], function valueFromConfig2(prop) {
|
||||
var valueFromConfig2Keys = ['url', 'method', 'params', 'data'];
|
||||
var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy'];
|
||||
var defaultToConfig2Keys = [
|
||||
'baseURL', 'url', 'transformRequest', 'transformResponse', 'paramsSerializer',
|
||||
'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
|
||||
'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress',
|
||||
'maxContentLength', 'validateStatus', 'maxRedirects', 'httpAgent',
|
||||
'httpsAgent', 'cancelToken', 'socketPath'
|
||||
];
|
||||
|
||||
utils.forEach(valueFromConfig2Keys, function valueFromConfig2(prop) {
|
||||
if (typeof config2[prop] !== 'undefined') {
|
||||
config[prop] = config2[prop];
|
||||
}
|
||||
});
|
||||
|
||||
utils.forEach(['headers', 'auth', 'proxy'], function mergeDeepProperties(prop) {
|
||||
utils.forEach(mergeDeepPropertiesKeys, function mergeDeepProperties(prop) {
|
||||
if (utils.isObject(config2[prop])) {
|
||||
config[prop] = utils.deepMerge(config1[prop], config2[prop]);
|
||||
} else if (typeof config2[prop] !== 'undefined') {
|
||||
@@ -1522,13 +1575,25 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
}
|
||||
});
|
||||
|
||||
utils.forEach([
|
||||
'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
|
||||
'timeout', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
|
||||
'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'maxContentLength',
|
||||
'validateStatus', 'maxRedirects', 'httpAgent', 'httpsAgent', 'cancelToken',
|
||||
'socketPath'
|
||||
], function defaultToConfig2(prop) {
|
||||
utils.forEach(defaultToConfig2Keys, function defaultToConfig2(prop) {
|
||||
if (typeof config2[prop] !== 'undefined') {
|
||||
config[prop] = config2[prop];
|
||||
} else if (typeof config1[prop] !== 'undefined') {
|
||||
config[prop] = config1[prop];
|
||||
}
|
||||
});
|
||||
|
||||
var axiosKeys = valueFromConfig2Keys
|
||||
.concat(mergeDeepPropertiesKeys)
|
||||
.concat(defaultToConfig2Keys);
|
||||
|
||||
var otherKeys = Object
|
||||
.keys(config2)
|
||||
.filter(function filterAxiosKeys(key) {
|
||||
return axiosKeys.indexOf(key) === -1;
|
||||
});
|
||||
|
||||
utils.forEach(otherKeys, function otherKeysDefaultToConfig2(prop) {
|
||||
if (typeof config2[prop] !== 'undefined') {
|
||||
config[prop] = config2[prop];
|
||||
} else if (typeof config1[prop] !== 'undefined') {
|
||||
@@ -1541,7 +1606,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 23 */
|
||||
/* 24 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
'use strict';
|
||||
@@ -1566,12 +1631,12 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 24 */
|
||||
/* 25 */
|
||||
/***/ (function(module, exports, __webpack_require__) {
|
||||
|
||||
'use strict';
|
||||
|
||||
var Cancel = __webpack_require__(23);
|
||||
var Cancel = __webpack_require__(24);
|
||||
|
||||
/**
|
||||
* A `CancelToken` is an object that can be used to request cancellation of an operation.
|
||||
@@ -1629,7 +1694,7 @@ return /******/ (function(modules) { // webpackBootstrap
|
||||
|
||||
|
||||
/***/ }),
|
||||
/* 25 */
|
||||
/* 26 */
|
||||
/***/ (function(module, exports) {
|
||||
|
||||
'use strict';
|
||||
|
||||
Reference in New Issue
Block a user