node-red-contrib-tak-registration 0.11.1 → 0.11.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/@types/node/LICENSE +0 -0
- package/node_modules/@types/node/README.md +4 -5
- package/node_modules/@types/node/assert/strict.d.ts +4 -4
- package/node_modules/@types/node/assert.d.ts +50 -26
- package/node_modules/@types/node/async_hooks.d.ts +13 -6
- package/node_modules/@types/node/buffer.d.ts +46 -38
- package/node_modules/@types/node/child_process.d.ts +278 -138
- package/node_modules/@types/node/cluster.d.ts +107 -89
- package/node_modules/@types/node/console.d.ts +18 -15
- package/node_modules/@types/node/constants.d.ts +12 -11
- package/node_modules/@types/node/crypto.d.ts +746 -268
- package/node_modules/@types/node/dgram.d.ts +82 -46
- package/node_modules/@types/node/diagnostics_channel.d.ts +3 -3
- package/node_modules/@types/node/dns/promises.d.ts +37 -26
- package/node_modules/@types/node/dns.d.ts +204 -63
- package/node_modules/@types/node/dom-events.d.ts +67 -71
- package/node_modules/@types/node/domain.d.ts +4 -4
- package/node_modules/@types/node/events.d.ts +99 -8
- package/node_modules/@types/node/fs/promises.d.ts +122 -85
- package/node_modules/@types/node/fs.d.ts +520 -316
- package/node_modules/@types/node/globals.d.ts +346 -286
- package/node_modules/@types/node/globals.global.d.ts +0 -0
- package/node_modules/@types/node/http.d.ts +321 -189
- package/node_modules/@types/node/http2.d.ts +630 -377
- package/node_modules/@types/node/https.d.ts +221 -112
- package/node_modules/@types/node/index.d.ts +0 -45
- package/node_modules/@types/node/inspector.d.ts +0 -1
- package/node_modules/@types/node/module.d.ts +75 -31
- package/node_modules/@types/node/net.d.ts +149 -93
- package/node_modules/@types/node/os.d.ts +10 -9
- package/node_modules/@types/node/package.json +88 -90
- package/node_modules/@types/node/path.d.ts +13 -13
- package/node_modules/@types/node/perf_hooks.d.ts +19 -18
- package/node_modules/@types/node/process.d.ts +170 -126
- package/node_modules/@types/node/punycode.d.ts +4 -4
- package/node_modules/@types/node/querystring.d.ts +14 -4
- package/node_modules/@types/node/readline/promises.d.ts +12 -7
- package/node_modules/@types/node/readline.d.ts +69 -56
- package/node_modules/@types/node/repl.d.ts +67 -61
- package/node_modules/@types/node/stream/consumers.d.ts +10 -10
- package/node_modules/@types/node/stream/promises.d.ts +56 -15
- package/node_modules/@types/node/stream/web.d.ts +40 -20
- package/node_modules/@types/node/stream.d.ts +365 -232
- package/node_modules/@types/node/string_decoder.d.ts +8 -8
- package/node_modules/@types/node/test.d.ts +133 -212
- package/node_modules/@types/node/timers/promises.d.ts +4 -4
- package/node_modules/@types/node/timers.d.ts +26 -11
- package/node_modules/@types/node/tls.d.ts +152 -72
- package/node_modules/@types/node/trace_events.d.ts +3 -3
- package/node_modules/@types/node/ts4.8/assert/strict.d.ts +4 -4
- package/node_modules/@types/node/ts4.8/assert.d.ts +50 -26
- package/node_modules/@types/node/ts4.8/async_hooks.d.ts +13 -6
- package/node_modules/@types/node/ts4.8/buffer.d.ts +47 -39
- package/node_modules/@types/node/ts4.8/child_process.d.ts +278 -138
- package/node_modules/@types/node/ts4.8/cluster.d.ts +107 -89
- package/node_modules/@types/node/ts4.8/console.d.ts +18 -15
- package/node_modules/@types/node/ts4.8/constants.d.ts +12 -11
- package/node_modules/@types/node/ts4.8/crypto.d.ts +746 -268
- package/node_modules/@types/node/ts4.8/dgram.d.ts +82 -46
- package/node_modules/@types/node/ts4.8/diagnostics_channel.d.ts +3 -3
- package/node_modules/@types/node/ts4.8/dns/promises.d.ts +37 -26
- package/node_modules/@types/node/ts4.8/dns.d.ts +204 -63
- package/node_modules/@types/node/ts4.8/dom-events.d.ts +67 -71
- package/node_modules/@types/node/ts4.8/domain.d.ts +4 -4
- package/node_modules/@types/node/ts4.8/events.d.ts +99 -8
- package/node_modules/@types/node/ts4.8/fs/promises.d.ts +122 -85
- package/node_modules/@types/node/ts4.8/fs.d.ts +520 -316
- package/node_modules/@types/node/ts4.8/globals.d.ts +346 -286
- package/node_modules/@types/node/ts4.8/globals.global.d.ts +0 -0
- package/node_modules/@types/node/ts4.8/http.d.ts +321 -189
- package/node_modules/@types/node/ts4.8/http2.d.ts +630 -377
- package/node_modules/@types/node/ts4.8/https.d.ts +221 -112
- package/node_modules/@types/node/ts4.8/index.d.ts +0 -0
- package/node_modules/@types/node/ts4.8/inspector.d.ts +0 -1
- package/node_modules/@types/node/ts4.8/module.d.ts +75 -31
- package/node_modules/@types/node/ts4.8/net.d.ts +149 -93
- package/node_modules/@types/node/ts4.8/os.d.ts +10 -9
- package/node_modules/@types/node/ts4.8/path.d.ts +13 -13
- package/node_modules/@types/node/ts4.8/perf_hooks.d.ts +19 -18
- package/node_modules/@types/node/ts4.8/process.d.ts +170 -126
- package/node_modules/@types/node/ts4.8/punycode.d.ts +4 -4
- package/node_modules/@types/node/ts4.8/querystring.d.ts +14 -4
- package/node_modules/@types/node/ts4.8/readline/promises.d.ts +12 -7
- package/node_modules/@types/node/ts4.8/readline.d.ts +69 -56
- package/node_modules/@types/node/ts4.8/repl.d.ts +67 -61
- package/node_modules/@types/node/ts4.8/stream/consumers.d.ts +10 -10
- package/node_modules/@types/node/ts4.8/stream/promises.d.ts +56 -15
- package/node_modules/@types/node/ts4.8/stream/web.d.ts +40 -20
- package/node_modules/@types/node/ts4.8/stream.d.ts +494 -223
- package/node_modules/@types/node/ts4.8/string_decoder.d.ts +8 -8
- package/node_modules/@types/node/ts4.8/test.d.ts +135 -214
- package/node_modules/@types/node/ts4.8/timers/promises.d.ts +4 -4
- package/node_modules/@types/node/ts4.8/timers.d.ts +26 -11
- package/node_modules/@types/node/ts4.8/tls.d.ts +152 -72
- package/node_modules/@types/node/ts4.8/trace_events.d.ts +3 -3
- package/node_modules/@types/node/ts4.8/tty.d.ts +10 -10
- package/node_modules/@types/node/ts4.8/url.d.ts +26 -14
- package/node_modules/@types/node/ts4.8/util.d.ts +187 -120
- package/node_modules/@types/node/ts4.8/v8.d.ts +4 -4
- package/node_modules/@types/node/ts4.8/vm.d.ts +58 -50
- package/node_modules/@types/node/ts4.8/wasi.d.ts +10 -4
- package/node_modules/@types/node/ts4.8/worker_threads.d.ts +83 -86
- package/node_modules/@types/node/ts4.8/zlib.d.ts +9 -9
- package/node_modules/@types/node/tty.d.ts +10 -10
- package/node_modules/@types/node/url.d.ts +26 -14
- package/node_modules/@types/node/util.d.ts +187 -120
- package/node_modules/@types/node/v8.d.ts +4 -4
- package/node_modules/@types/node/vm.d.ts +58 -50
- package/node_modules/@types/node/wasi.d.ts +10 -4
- package/node_modules/@types/node/worker_threads.d.ts +83 -86
- package/node_modules/@types/node/zlib.d.ts +9 -9
- package/node_modules/axios/CHANGELOG.md +225 -0
- package/node_modules/axios/README.md +273 -9
- package/node_modules/axios/dist/axios.js +249 -178
- package/node_modules/axios/dist/axios.js.map +1 -1
- package/node_modules/axios/dist/axios.min.js +1 -1
- package/node_modules/axios/dist/axios.min.js.map +1 -1
- package/node_modules/axios/dist/browser/axios.cjs +213 -193
- package/node_modules/axios/dist/browser/axios.cjs.map +1 -1
- package/node_modules/axios/dist/esm/axios.js +213 -193
- package/node_modules/axios/dist/esm/axios.js.map +1 -1
- package/node_modules/axios/dist/esm/axios.min.js +1 -1
- package/node_modules/axios/dist/esm/axios.min.js.map +1 -1
- package/node_modules/axios/dist/node/axios.cjs +297 -213
- package/node_modules/axios/dist/node/axios.cjs.map +1 -1
- package/node_modules/axios/index.d.cts +20 -11
- package/node_modules/axios/index.d.ts +21 -12
- package/node_modules/axios/lib/adapters/adapters.js +33 -15
- package/node_modules/axios/lib/adapters/http.js +25 -12
- package/node_modules/axios/lib/adapters/xhr.js +17 -10
- package/node_modules/axios/lib/core/mergeConfig.js +1 -0
- package/node_modules/axios/lib/defaults/index.js +1 -1
- package/node_modules/axios/lib/env/data.js +1 -1
- package/node_modules/axios/lib/helpers/cookies.js +39 -49
- package/node_modules/axios/lib/helpers/isURLSameOrigin.js +2 -2
- package/node_modules/axios/lib/platform/browser/index.js +0 -51
- package/node_modules/axios/lib/platform/common/utils.js +47 -0
- package/node_modules/axios/lib/platform/index.js +5 -1
- package/node_modules/axios/package.json +2 -1
- package/node_modules/call-bind/.eslintrc +0 -1
- package/node_modules/call-bind/.nycrc +0 -4
- package/node_modules/call-bind/CHANGELOG.md +35 -0
- package/node_modules/call-bind/README.md +63 -1
- package/node_modules/call-bind/index.js +10 -13
- package/node_modules/call-bind/package.json +33 -23
- package/node_modules/call-bind/test/callBound.js +0 -1
- package/node_modules/call-bind/test/index.js +18 -4
- package/node_modules/{function-bind → deep-equal}/.editorconfig +1 -1
- package/node_modules/deep-equal/.eslintrc +6 -0
- package/node_modules/deep-equal/.nycrc +17 -0
- package/node_modules/deep-equal/CHANGELOG.md +204 -4
- package/node_modules/deep-equal/assert.js +3 -0
- package/node_modules/deep-equal/package.json +39 -17
- package/node_modules/deep-equal/readme.markdown +28 -12
- package/node_modules/deep-equal/test/_tape.js +24 -3
- package/node_modules/deep-equal/test/cmp.js +1047 -48
- package/node_modules/define-data-property/CHANGELOG.md +10 -0
- package/node_modules/define-data-property/index.d.ts.map +1 -1
- package/node_modules/define-data-property/index.js +8 -0
- package/node_modules/define-data-property/package.json +11 -9
- package/node_modules/define-data-property/test/index.js +6 -11
- package/node_modules/define-data-property/tsconfig.json +1 -0
- package/node_modules/fast-xml-parser/CHANGELOG.md +11 -0
- package/node_modules/fast-xml-parser/package.json +5 -5
- package/node_modules/fast-xml-parser/src/xmlbuilder/json2xml.js +1 -0
- package/node_modules/fast-xml-parser/src/xmlbuilder/orderedJs2Xml.js +4 -0
- package/node_modules/fast-xml-parser/src/xmlparser/OrderedObjParser.js +6 -3
- package/node_modules/follow-redirects/index.js +16 -4
- package/node_modules/follow-redirects/package.json +2 -3
- package/node_modules/function-bind/.eslintrc +11 -5
- package/node_modules/function-bind/.github/FUNDING.yml +12 -0
- package/node_modules/function-bind/.github/SECURITY.md +3 -0
- package/node_modules/function-bind/.nycrc +13 -0
- package/node_modules/function-bind/CHANGELOG.md +136 -0
- package/node_modules/function-bind/README.md +25 -27
- package/node_modules/function-bind/implementation.js +44 -12
- package/node_modules/function-bind/package.json +38 -14
- package/node_modules/get-intrinsic/CHANGELOG.md +8 -0
- package/node_modules/get-intrinsic/index.js +1 -1
- package/node_modules/get-intrinsic/package.json +11 -11
- package/node_modules/has-property-descriptors/CHANGELOG.md +11 -0
- package/node_modules/has-property-descriptors/package.json +13 -6
- package/node_modules/hasown/.eslintrc +5 -0
- package/node_modules/hasown/.github/FUNDING.yml +12 -0
- package/node_modules/hasown/.nycrc +13 -0
- package/node_modules/hasown/CHANGELOG.md +20 -0
- package/node_modules/hasown/LICENSE +21 -0
- package/node_modules/hasown/README.md +40 -0
- package/node_modules/hasown/index.d.ts +3 -0
- package/node_modules/hasown/index.d.ts.map +1 -0
- package/node_modules/hasown/index.js +8 -0
- package/node_modules/hasown/package.json +91 -0
- package/node_modules/hasown/tsconfig.json +49 -0
- package/node_modules/set-function-length/.eslintrc +27 -0
- package/node_modules/set-function-length/.github/FUNDING.yml +12 -0
- package/node_modules/set-function-length/.nycrc +13 -0
- package/node_modules/set-function-length/CHANGELOG.md +41 -0
- package/node_modules/set-function-length/LICENSE +21 -0
- package/node_modules/set-function-length/README.md +56 -0
- package/node_modules/set-function-length/env.js +19 -0
- package/node_modules/set-function-length/index.js +41 -0
- package/node_modules/set-function-length/package.json +84 -0
- package/node_modules/undici-types/README.md +6 -0
- package/node_modules/undici-types/agent.d.ts +31 -0
- package/node_modules/undici-types/api.d.ts +43 -0
- package/node_modules/undici-types/balanced-pool.d.ts +18 -0
- package/node_modules/undici-types/cache.d.ts +36 -0
- package/node_modules/undici-types/client.d.ts +97 -0
- package/node_modules/undici-types/connector.d.ts +34 -0
- package/node_modules/undici-types/content-type.d.ts +21 -0
- package/node_modules/undici-types/cookies.d.ts +28 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +67 -0
- package/node_modules/undici-types/dispatcher.d.ts +241 -0
- package/node_modules/undici-types/errors.d.ts +128 -0
- package/node_modules/undici-types/fetch.d.ts +209 -0
- package/node_modules/undici-types/file.d.ts +39 -0
- package/node_modules/undici-types/filereader.d.ts +54 -0
- package/node_modules/undici-types/formdata.d.ts +108 -0
- package/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/node_modules/undici-types/global-origin.d.ts +7 -0
- package/node_modules/undici-types/handlers.d.ts +9 -0
- package/node_modules/undici-types/header.d.ts +4 -0
- package/node_modules/undici-types/index.d.ts +63 -0
- package/node_modules/undici-types/interceptors.d.ts +5 -0
- package/node_modules/undici-types/mock-agent.d.ts +50 -0
- package/node_modules/undici-types/mock-client.d.ts +25 -0
- package/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/node_modules/undici-types/mock-interceptor.d.ts +93 -0
- package/node_modules/undici-types/mock-pool.d.ts +25 -0
- package/node_modules/undici-types/package.json +55 -0
- package/node_modules/undici-types/patch.d.ts +71 -0
- package/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/node_modules/undici-types/pool.d.ts +28 -0
- package/node_modules/undici-types/proxy-agent.d.ts +30 -0
- package/node_modules/undici-types/readable.d.ts +61 -0
- package/node_modules/undici-types/webidl.d.ts +220 -0
- package/node_modules/undici-types/websocket.d.ts +131 -0
- package/package.json +3 -3
- package/tak-ingest.js +42 -23
- package/tak-registration.html +4 -4
- package/node_modules/define-data-property/tsinit +0 -109
- package/node_modules/function-bind/.jscs.json +0 -176
- package/node_modules/function-bind/.npmignore +0 -22
- package/node_modules/function-bind/.travis.yml +0 -168
- package/node_modules/has/LICENSE-MIT +0 -22
- package/node_modules/has/README.md +0 -18
- package/node_modules/has/package.json +0 -48
- package/node_modules/has/src/index.js +0 -5
- package/node_modules/has/test/index.js +0 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Axios v1.
|
|
1
|
+
// Axios v1.6.2 Copyright (c) 2023 Matt Zabriskie and contributors
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
function bind(fn, thisArg) {
|
|
@@ -673,7 +673,7 @@ const isAsyncFn = kindOfTest('AsyncFunction');
|
|
|
673
673
|
const isThenable = (thing) =>
|
|
674
674
|
thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
|
|
675
675
|
|
|
676
|
-
var utils = {
|
|
676
|
+
var utils$1 = {
|
|
677
677
|
isArray,
|
|
678
678
|
isArrayBuffer,
|
|
679
679
|
isBuffer,
|
|
@@ -755,7 +755,7 @@ function AxiosError(message, code, config, request, response) {
|
|
|
755
755
|
response && (this.response = response);
|
|
756
756
|
}
|
|
757
757
|
|
|
758
|
-
utils.inherits(AxiosError, Error, {
|
|
758
|
+
utils$1.inherits(AxiosError, Error, {
|
|
759
759
|
toJSON: function toJSON() {
|
|
760
760
|
return {
|
|
761
761
|
// Standard
|
|
@@ -770,7 +770,7 @@ utils.inherits(AxiosError, Error, {
|
|
|
770
770
|
columnNumber: this.columnNumber,
|
|
771
771
|
stack: this.stack,
|
|
772
772
|
// Axios
|
|
773
|
-
config: utils.toJSONObject(this.config),
|
|
773
|
+
config: utils$1.toJSONObject(this.config),
|
|
774
774
|
code: this.code,
|
|
775
775
|
status: this.response && this.response.status ? this.response.status : null
|
|
776
776
|
};
|
|
@@ -805,7 +805,7 @@ Object.defineProperty(prototype$1, 'isAxiosError', {value: true});
|
|
|
805
805
|
AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
806
806
|
const axiosError = Object.create(prototype$1);
|
|
807
807
|
|
|
808
|
-
utils.toFlatObject(error, axiosError, function filter(obj) {
|
|
808
|
+
utils$1.toFlatObject(error, axiosError, function filter(obj) {
|
|
809
809
|
return obj !== Error.prototype;
|
|
810
810
|
}, prop => {
|
|
811
811
|
return prop !== 'isAxiosError';
|
|
@@ -833,7 +833,7 @@ var httpAdapter = null;
|
|
|
833
833
|
* @returns {boolean}
|
|
834
834
|
*/
|
|
835
835
|
function isVisitable(thing) {
|
|
836
|
-
return utils.isPlainObject(thing) || utils.isArray(thing);
|
|
836
|
+
return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
|
|
837
837
|
}
|
|
838
838
|
|
|
839
839
|
/**
|
|
@@ -844,7 +844,7 @@ function isVisitable(thing) {
|
|
|
844
844
|
* @returns {string} the key without the brackets.
|
|
845
845
|
*/
|
|
846
846
|
function removeBrackets(key) {
|
|
847
|
-
return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;
|
|
847
|
+
return utils$1.endsWith(key, '[]') ? key.slice(0, -2) : key;
|
|
848
848
|
}
|
|
849
849
|
|
|
850
850
|
/**
|
|
@@ -873,10 +873,10 @@ function renderKey(path, key, dots) {
|
|
|
873
873
|
* @returns {boolean}
|
|
874
874
|
*/
|
|
875
875
|
function isFlatArray(arr) {
|
|
876
|
-
return utils.isArray(arr) && !arr.some(isVisitable);
|
|
876
|
+
return utils$1.isArray(arr) && !arr.some(isVisitable);
|
|
877
877
|
}
|
|
878
878
|
|
|
879
|
-
const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
|
|
879
|
+
const predicates = utils$1.toFlatObject(utils$1, {}, null, function filter(prop) {
|
|
880
880
|
return /^is[A-Z]/.test(prop);
|
|
881
881
|
});
|
|
882
882
|
|
|
@@ -904,7 +904,7 @@ const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
|
|
|
904
904
|
* @returns
|
|
905
905
|
*/
|
|
906
906
|
function toFormData(obj, formData, options) {
|
|
907
|
-
if (!utils.isObject(obj)) {
|
|
907
|
+
if (!utils$1.isObject(obj)) {
|
|
908
908
|
throw new TypeError('target must be an object');
|
|
909
909
|
}
|
|
910
910
|
|
|
@@ -912,13 +912,13 @@ function toFormData(obj, formData, options) {
|
|
|
912
912
|
formData = formData || new (FormData)();
|
|
913
913
|
|
|
914
914
|
// eslint-disable-next-line no-param-reassign
|
|
915
|
-
options = utils.toFlatObject(options, {
|
|
915
|
+
options = utils$1.toFlatObject(options, {
|
|
916
916
|
metaTokens: true,
|
|
917
917
|
dots: false,
|
|
918
918
|
indexes: false
|
|
919
919
|
}, false, function defined(option, source) {
|
|
920
920
|
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
921
|
-
return !utils.isUndefined(source[option]);
|
|
921
|
+
return !utils$1.isUndefined(source[option]);
|
|
922
922
|
});
|
|
923
923
|
|
|
924
924
|
const metaTokens = options.metaTokens;
|
|
@@ -927,24 +927,24 @@ function toFormData(obj, formData, options) {
|
|
|
927
927
|
const dots = options.dots;
|
|
928
928
|
const indexes = options.indexes;
|
|
929
929
|
const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
|
|
930
|
-
const useBlob = _Blob && utils.isSpecCompliantForm(formData);
|
|
930
|
+
const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
|
|
931
931
|
|
|
932
|
-
if (!utils.isFunction(visitor)) {
|
|
932
|
+
if (!utils$1.isFunction(visitor)) {
|
|
933
933
|
throw new TypeError('visitor must be a function');
|
|
934
934
|
}
|
|
935
935
|
|
|
936
936
|
function convertValue(value) {
|
|
937
937
|
if (value === null) return '';
|
|
938
938
|
|
|
939
|
-
if (utils.isDate(value)) {
|
|
939
|
+
if (utils$1.isDate(value)) {
|
|
940
940
|
return value.toISOString();
|
|
941
941
|
}
|
|
942
942
|
|
|
943
|
-
if (!useBlob && utils.isBlob(value)) {
|
|
943
|
+
if (!useBlob && utils$1.isBlob(value)) {
|
|
944
944
|
throw new AxiosError('Blob is not supported. Use a Buffer instead.');
|
|
945
945
|
}
|
|
946
946
|
|
|
947
|
-
if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
|
|
947
|
+
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
|
|
948
948
|
return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
|
|
949
949
|
}
|
|
950
950
|
|
|
@@ -965,20 +965,20 @@ function toFormData(obj, formData, options) {
|
|
|
965
965
|
let arr = value;
|
|
966
966
|
|
|
967
967
|
if (value && !path && typeof value === 'object') {
|
|
968
|
-
if (utils.endsWith(key, '{}')) {
|
|
968
|
+
if (utils$1.endsWith(key, '{}')) {
|
|
969
969
|
// eslint-disable-next-line no-param-reassign
|
|
970
970
|
key = metaTokens ? key : key.slice(0, -2);
|
|
971
971
|
// eslint-disable-next-line no-param-reassign
|
|
972
972
|
value = JSON.stringify(value);
|
|
973
973
|
} else if (
|
|
974
|
-
(utils.isArray(value) && isFlatArray(value)) ||
|
|
975
|
-
((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))
|
|
974
|
+
(utils$1.isArray(value) && isFlatArray(value)) ||
|
|
975
|
+
((utils$1.isFileList(value) || utils$1.endsWith(key, '[]')) && (arr = utils$1.toArray(value))
|
|
976
976
|
)) {
|
|
977
977
|
// eslint-disable-next-line no-param-reassign
|
|
978
978
|
key = removeBrackets(key);
|
|
979
979
|
|
|
980
980
|
arr.forEach(function each(el, index) {
|
|
981
|
-
!(utils.isUndefined(el) || el === null) && formData.append(
|
|
981
|
+
!(utils$1.isUndefined(el) || el === null) && formData.append(
|
|
982
982
|
// eslint-disable-next-line no-nested-ternary
|
|
983
983
|
indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),
|
|
984
984
|
convertValue(el)
|
|
@@ -1006,7 +1006,7 @@ function toFormData(obj, formData, options) {
|
|
|
1006
1006
|
});
|
|
1007
1007
|
|
|
1008
1008
|
function build(value, path) {
|
|
1009
|
-
if (utils.isUndefined(value)) return;
|
|
1009
|
+
if (utils$1.isUndefined(value)) return;
|
|
1010
1010
|
|
|
1011
1011
|
if (stack.indexOf(value) !== -1) {
|
|
1012
1012
|
throw Error('Circular reference detected in ' + path.join('.'));
|
|
@@ -1014,9 +1014,9 @@ function toFormData(obj, formData, options) {
|
|
|
1014
1014
|
|
|
1015
1015
|
stack.push(value);
|
|
1016
1016
|
|
|
1017
|
-
utils.forEach(value, function each(el, key) {
|
|
1018
|
-
const result = !(utils.isUndefined(el) || el === null) && visitor.call(
|
|
1019
|
-
formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers
|
|
1017
|
+
utils$1.forEach(value, function each(el, key) {
|
|
1018
|
+
const result = !(utils$1.isUndefined(el) || el === null) && visitor.call(
|
|
1019
|
+
formData, el, utils$1.isString(key) ? key.trim() : key, path, exposedHelpers
|
|
1020
1020
|
);
|
|
1021
1021
|
|
|
1022
1022
|
if (result === true) {
|
|
@@ -1027,7 +1027,7 @@ function toFormData(obj, formData, options) {
|
|
|
1027
1027
|
stack.pop();
|
|
1028
1028
|
}
|
|
1029
1029
|
|
|
1030
|
-
if (!utils.isObject(obj)) {
|
|
1030
|
+
if (!utils$1.isObject(obj)) {
|
|
1031
1031
|
throw new TypeError('data must be an object');
|
|
1032
1032
|
}
|
|
1033
1033
|
|
|
@@ -1131,7 +1131,7 @@ function buildURL(url, params, options) {
|
|
|
1131
1131
|
if (serializeFn) {
|
|
1132
1132
|
serializedParams = serializeFn(params, options);
|
|
1133
1133
|
} else {
|
|
1134
|
-
serializedParams = utils.isURLSearchParams(params) ?
|
|
1134
|
+
serializedParams = utils$1.isURLSearchParams(params) ?
|
|
1135
1135
|
params.toString() :
|
|
1136
1136
|
new AxiosURLSearchParams(params, options).toString(_encode);
|
|
1137
1137
|
}
|
|
@@ -1206,7 +1206,7 @@ class InterceptorManager {
|
|
|
1206
1206
|
* @returns {void}
|
|
1207
1207
|
*/
|
|
1208
1208
|
forEach(fn) {
|
|
1209
|
-
utils.forEach(this.handlers, function forEachHandler(h) {
|
|
1209
|
+
utils$1.forEach(this.handlers, function forEachHandler(h) {
|
|
1210
1210
|
if (h !== null) {
|
|
1211
1211
|
fn(h);
|
|
1212
1212
|
}
|
|
@@ -1228,6 +1228,18 @@ var FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
|
|
|
1228
1228
|
|
|
1229
1229
|
var Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
|
|
1230
1230
|
|
|
1231
|
+
var platform$1 = {
|
|
1232
|
+
isBrowser: true,
|
|
1233
|
+
classes: {
|
|
1234
|
+
URLSearchParams: URLSearchParams$1,
|
|
1235
|
+
FormData: FormData$1,
|
|
1236
|
+
Blob: Blob$1
|
|
1237
|
+
},
|
|
1238
|
+
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
|
|
1239
|
+
};
|
|
1240
|
+
|
|
1241
|
+
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
1242
|
+
|
|
1231
1243
|
/**
|
|
1232
1244
|
* Determine if we're running in a standard browser environment
|
|
1233
1245
|
*
|
|
@@ -1245,18 +1257,10 @@ var Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
|
|
|
1245
1257
|
*
|
|
1246
1258
|
* @returns {boolean}
|
|
1247
1259
|
*/
|
|
1248
|
-
const
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
product === 'NativeScript' ||
|
|
1253
|
-
product === 'NS')
|
|
1254
|
-
) {
|
|
1255
|
-
return false;
|
|
1256
|
-
}
|
|
1257
|
-
|
|
1258
|
-
return typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
1259
|
-
})();
|
|
1260
|
+
const hasStandardBrowserEnv = (
|
|
1261
|
+
(product) => {
|
|
1262
|
+
return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0
|
|
1263
|
+
})(typeof navigator !== 'undefined' && navigator.product);
|
|
1260
1264
|
|
|
1261
1265
|
/**
|
|
1262
1266
|
* Determine if we're running in a standard browser webWorker environment
|
|
@@ -1267,7 +1271,7 @@ const isStandardBrowserEnv = (() => {
|
|
|
1267
1271
|
* `typeof window !== 'undefined' && typeof document !== 'undefined'`.
|
|
1268
1272
|
* This leads to a problem when axios post `FormData` in webWorker
|
|
1269
1273
|
*/
|
|
1270
|
-
|
|
1274
|
+
const hasStandardBrowserWebWorkerEnv = (() => {
|
|
1271
1275
|
return (
|
|
1272
1276
|
typeof WorkerGlobalScope !== 'undefined' &&
|
|
1273
1277
|
// eslint-disable-next-line no-undef
|
|
@@ -1276,23 +1280,22 @@ const isStandardBrowserEnv = (() => {
|
|
|
1276
1280
|
);
|
|
1277
1281
|
})();
|
|
1278
1282
|
|
|
1283
|
+
var utils = /*#__PURE__*/Object.freeze({
|
|
1284
|
+
__proto__: null,
|
|
1285
|
+
hasBrowserEnv: hasBrowserEnv,
|
|
1286
|
+
hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
|
|
1287
|
+
hasStandardBrowserEnv: hasStandardBrowserEnv
|
|
1288
|
+
});
|
|
1279
1289
|
|
|
1280
1290
|
var platform = {
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
URLSearchParams: URLSearchParams$1,
|
|
1284
|
-
FormData: FormData$1,
|
|
1285
|
-
Blob: Blob$1
|
|
1286
|
-
},
|
|
1287
|
-
isStandardBrowserEnv,
|
|
1288
|
-
isStandardBrowserWebWorkerEnv,
|
|
1289
|
-
protocols: ['http', 'https', 'file', 'blob', 'url', 'data']
|
|
1291
|
+
...utils,
|
|
1292
|
+
...platform$1
|
|
1290
1293
|
};
|
|
1291
1294
|
|
|
1292
1295
|
function toURLEncodedForm(data, options) {
|
|
1293
1296
|
return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
|
|
1294
1297
|
visitor: function(value, key, path, helpers) {
|
|
1295
|
-
if (platform.isNode && utils.isBuffer(value)) {
|
|
1298
|
+
if (platform.isNode && utils$1.isBuffer(value)) {
|
|
1296
1299
|
this.append(key, value.toString('base64'));
|
|
1297
1300
|
return false;
|
|
1298
1301
|
}
|
|
@@ -1314,7 +1317,7 @@ function parsePropPath(name) {
|
|
|
1314
1317
|
// foo.x.y.z
|
|
1315
1318
|
// foo-x-y-z
|
|
1316
1319
|
// foo x y z
|
|
1317
|
-
return utils.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
|
|
1320
|
+
return utils$1.matchAll(/\w+|\[(\w*)]/g, name).map(match => {
|
|
1318
1321
|
return match[0] === '[]' ? '' : match[1] || match[0];
|
|
1319
1322
|
});
|
|
1320
1323
|
}
|
|
@@ -1351,10 +1354,10 @@ function formDataToJSON(formData) {
|
|
|
1351
1354
|
let name = path[index++];
|
|
1352
1355
|
const isNumericKey = Number.isFinite(+name);
|
|
1353
1356
|
const isLast = index >= path.length;
|
|
1354
|
-
name = !name && utils.isArray(target) ? target.length : name;
|
|
1357
|
+
name = !name && utils$1.isArray(target) ? target.length : name;
|
|
1355
1358
|
|
|
1356
1359
|
if (isLast) {
|
|
1357
|
-
if (utils.hasOwnProp(target, name)) {
|
|
1360
|
+
if (utils$1.hasOwnProp(target, name)) {
|
|
1358
1361
|
target[name] = [target[name], value];
|
|
1359
1362
|
} else {
|
|
1360
1363
|
target[name] = value;
|
|
@@ -1363,23 +1366,23 @@ function formDataToJSON(formData) {
|
|
|
1363
1366
|
return !isNumericKey;
|
|
1364
1367
|
}
|
|
1365
1368
|
|
|
1366
|
-
if (!target[name] || !utils.isObject(target[name])) {
|
|
1369
|
+
if (!target[name] || !utils$1.isObject(target[name])) {
|
|
1367
1370
|
target[name] = [];
|
|
1368
1371
|
}
|
|
1369
1372
|
|
|
1370
1373
|
const result = buildPath(path, value, target[name], index);
|
|
1371
1374
|
|
|
1372
|
-
if (result && utils.isArray(target[name])) {
|
|
1375
|
+
if (result && utils$1.isArray(target[name])) {
|
|
1373
1376
|
target[name] = arrayToObject(target[name]);
|
|
1374
1377
|
}
|
|
1375
1378
|
|
|
1376
1379
|
return !isNumericKey;
|
|
1377
1380
|
}
|
|
1378
1381
|
|
|
1379
|
-
if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {
|
|
1382
|
+
if (utils$1.isFormData(formData) && utils$1.isFunction(formData.entries)) {
|
|
1380
1383
|
const obj = {};
|
|
1381
1384
|
|
|
1382
|
-
utils.forEachEntry(formData, (name, value) => {
|
|
1385
|
+
utils$1.forEachEntry(formData, (name, value) => {
|
|
1383
1386
|
buildPath(parsePropPath(name), value, obj, 0);
|
|
1384
1387
|
});
|
|
1385
1388
|
|
|
@@ -1400,10 +1403,10 @@ function formDataToJSON(formData) {
|
|
|
1400
1403
|
* @returns {string} A stringified version of the rawValue.
|
|
1401
1404
|
*/
|
|
1402
1405
|
function stringifySafely(rawValue, parser, encoder) {
|
|
1403
|
-
if (utils.isString(rawValue)) {
|
|
1406
|
+
if (utils$1.isString(rawValue)) {
|
|
1404
1407
|
try {
|
|
1405
1408
|
(parser || JSON.parse)(rawValue);
|
|
1406
|
-
return utils.trim(rawValue);
|
|
1409
|
+
return utils$1.trim(rawValue);
|
|
1407
1410
|
} catch (e) {
|
|
1408
1411
|
if (e.name !== 'SyntaxError') {
|
|
1409
1412
|
throw e;
|
|
@@ -1418,18 +1421,18 @@ const defaults = {
|
|
|
1418
1421
|
|
|
1419
1422
|
transitional: transitionalDefaults,
|
|
1420
1423
|
|
|
1421
|
-
adapter:
|
|
1424
|
+
adapter: ['xhr', 'http'],
|
|
1422
1425
|
|
|
1423
1426
|
transformRequest: [function transformRequest(data, headers) {
|
|
1424
1427
|
const contentType = headers.getContentType() || '';
|
|
1425
1428
|
const hasJSONContentType = contentType.indexOf('application/json') > -1;
|
|
1426
|
-
const isObjectPayload = utils.isObject(data);
|
|
1429
|
+
const isObjectPayload = utils$1.isObject(data);
|
|
1427
1430
|
|
|
1428
|
-
if (isObjectPayload && utils.isHTMLForm(data)) {
|
|
1431
|
+
if (isObjectPayload && utils$1.isHTMLForm(data)) {
|
|
1429
1432
|
data = new FormData(data);
|
|
1430
1433
|
}
|
|
1431
1434
|
|
|
1432
|
-
const isFormData = utils.isFormData(data);
|
|
1435
|
+
const isFormData = utils$1.isFormData(data);
|
|
1433
1436
|
|
|
1434
1437
|
if (isFormData) {
|
|
1435
1438
|
if (!hasJSONContentType) {
|
|
@@ -1438,18 +1441,18 @@ const defaults = {
|
|
|
1438
1441
|
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
|
1439
1442
|
}
|
|
1440
1443
|
|
|
1441
|
-
if (utils.isArrayBuffer(data) ||
|
|
1442
|
-
utils.isBuffer(data) ||
|
|
1443
|
-
utils.isStream(data) ||
|
|
1444
|
-
utils.isFile(data) ||
|
|
1445
|
-
utils.isBlob(data)
|
|
1444
|
+
if (utils$1.isArrayBuffer(data) ||
|
|
1445
|
+
utils$1.isBuffer(data) ||
|
|
1446
|
+
utils$1.isStream(data) ||
|
|
1447
|
+
utils$1.isFile(data) ||
|
|
1448
|
+
utils$1.isBlob(data)
|
|
1446
1449
|
) {
|
|
1447
1450
|
return data;
|
|
1448
1451
|
}
|
|
1449
|
-
if (utils.isArrayBufferView(data)) {
|
|
1452
|
+
if (utils$1.isArrayBufferView(data)) {
|
|
1450
1453
|
return data.buffer;
|
|
1451
1454
|
}
|
|
1452
|
-
if (utils.isURLSearchParams(data)) {
|
|
1455
|
+
if (utils$1.isURLSearchParams(data)) {
|
|
1453
1456
|
headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);
|
|
1454
1457
|
return data.toString();
|
|
1455
1458
|
}
|
|
@@ -1461,7 +1464,7 @@ const defaults = {
|
|
|
1461
1464
|
return toURLEncodedForm(data, this.formSerializer).toString();
|
|
1462
1465
|
}
|
|
1463
1466
|
|
|
1464
|
-
if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
|
|
1467
|
+
if ((isFileList = utils$1.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {
|
|
1465
1468
|
const _FormData = this.env && this.env.FormData;
|
|
1466
1469
|
|
|
1467
1470
|
return toFormData(
|
|
@@ -1485,7 +1488,7 @@ const defaults = {
|
|
|
1485
1488
|
const forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
1486
1489
|
const JSONRequested = this.responseType === 'json';
|
|
1487
1490
|
|
|
1488
|
-
if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
|
|
1491
|
+
if (data && utils$1.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {
|
|
1489
1492
|
const silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
1490
1493
|
const strictJSONParsing = !silentJSONParsing && JSONRequested;
|
|
1491
1494
|
|
|
@@ -1533,7 +1536,7 @@ const defaults = {
|
|
|
1533
1536
|
}
|
|
1534
1537
|
};
|
|
1535
1538
|
|
|
1536
|
-
utils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
1539
|
+
utils$1.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {
|
|
1537
1540
|
defaults.headers[method] = {};
|
|
1538
1541
|
});
|
|
1539
1542
|
|
|
@@ -1541,7 +1544,7 @@ var defaults$1 = defaults;
|
|
|
1541
1544
|
|
|
1542
1545
|
// RawAxiosHeaders whose duplicates are ignored by node
|
|
1543
1546
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
1544
|
-
const ignoreDuplicateOf = utils.toObjectSet([
|
|
1547
|
+
const ignoreDuplicateOf = utils$1.toObjectSet([
|
|
1545
1548
|
'age', 'authorization', 'content-length', 'content-type', 'etag',
|
|
1546
1549
|
'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
|
|
1547
1550
|
'last-modified', 'location', 'max-forwards', 'proxy-authorization',
|
|
@@ -1602,7 +1605,7 @@ function normalizeValue(value) {
|
|
|
1602
1605
|
return value;
|
|
1603
1606
|
}
|
|
1604
1607
|
|
|
1605
|
-
return utils.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
1608
|
+
return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
1606
1609
|
}
|
|
1607
1610
|
|
|
1608
1611
|
function parseTokens(str) {
|
|
@@ -1620,7 +1623,7 @@ function parseTokens(str) {
|
|
|
1620
1623
|
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
|
1621
1624
|
|
|
1622
1625
|
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
1623
|
-
if (utils.isFunction(filter)) {
|
|
1626
|
+
if (utils$1.isFunction(filter)) {
|
|
1624
1627
|
return filter.call(this, value, header);
|
|
1625
1628
|
}
|
|
1626
1629
|
|
|
@@ -1628,13 +1631,13 @@ function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
|
|
1628
1631
|
value = header;
|
|
1629
1632
|
}
|
|
1630
1633
|
|
|
1631
|
-
if (!utils.isString(value)) return;
|
|
1634
|
+
if (!utils$1.isString(value)) return;
|
|
1632
1635
|
|
|
1633
|
-
if (utils.isString(filter)) {
|
|
1636
|
+
if (utils$1.isString(filter)) {
|
|
1634
1637
|
return value.indexOf(filter) !== -1;
|
|
1635
1638
|
}
|
|
1636
1639
|
|
|
1637
|
-
if (utils.isRegExp(filter)) {
|
|
1640
|
+
if (utils$1.isRegExp(filter)) {
|
|
1638
1641
|
return filter.test(value);
|
|
1639
1642
|
}
|
|
1640
1643
|
}
|
|
@@ -1647,7 +1650,7 @@ function formatHeader(header) {
|
|
|
1647
1650
|
}
|
|
1648
1651
|
|
|
1649
1652
|
function buildAccessors(obj, header) {
|
|
1650
|
-
const accessorName = utils.toCamelCase(' ' + header);
|
|
1653
|
+
const accessorName = utils$1.toCamelCase(' ' + header);
|
|
1651
1654
|
|
|
1652
1655
|
['get', 'set', 'has'].forEach(methodName => {
|
|
1653
1656
|
Object.defineProperty(obj, methodName + accessorName, {
|
|
@@ -1674,7 +1677,7 @@ class AxiosHeaders {
|
|
|
1674
1677
|
throw new Error('header name must be a non-empty string');
|
|
1675
1678
|
}
|
|
1676
1679
|
|
|
1677
|
-
const key = utils.findKey(self, lHeader);
|
|
1680
|
+
const key = utils$1.findKey(self, lHeader);
|
|
1678
1681
|
|
|
1679
1682
|
if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {
|
|
1680
1683
|
self[key || _header] = normalizeValue(_value);
|
|
@@ -1682,11 +1685,11 @@ class AxiosHeaders {
|
|
|
1682
1685
|
}
|
|
1683
1686
|
|
|
1684
1687
|
const setHeaders = (headers, _rewrite) =>
|
|
1685
|
-
utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
1688
|
+
utils$1.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));
|
|
1686
1689
|
|
|
1687
|
-
if (utils.isPlainObject(header) || header instanceof this.constructor) {
|
|
1690
|
+
if (utils$1.isPlainObject(header) || header instanceof this.constructor) {
|
|
1688
1691
|
setHeaders(header, valueOrRewrite);
|
|
1689
|
-
} else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
1692
|
+
} else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
1690
1693
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
1691
1694
|
} else {
|
|
1692
1695
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
|
@@ -1699,7 +1702,7 @@ class AxiosHeaders {
|
|
|
1699
1702
|
header = normalizeHeader(header);
|
|
1700
1703
|
|
|
1701
1704
|
if (header) {
|
|
1702
|
-
const key = utils.findKey(this, header);
|
|
1705
|
+
const key = utils$1.findKey(this, header);
|
|
1703
1706
|
|
|
1704
1707
|
if (key) {
|
|
1705
1708
|
const value = this[key];
|
|
@@ -1712,11 +1715,11 @@ class AxiosHeaders {
|
|
|
1712
1715
|
return parseTokens(value);
|
|
1713
1716
|
}
|
|
1714
1717
|
|
|
1715
|
-
if (utils.isFunction(parser)) {
|
|
1718
|
+
if (utils$1.isFunction(parser)) {
|
|
1716
1719
|
return parser.call(this, value, key);
|
|
1717
1720
|
}
|
|
1718
1721
|
|
|
1719
|
-
if (utils.isRegExp(parser)) {
|
|
1722
|
+
if (utils$1.isRegExp(parser)) {
|
|
1720
1723
|
return parser.exec(value);
|
|
1721
1724
|
}
|
|
1722
1725
|
|
|
@@ -1729,7 +1732,7 @@ class AxiosHeaders {
|
|
|
1729
1732
|
header = normalizeHeader(header);
|
|
1730
1733
|
|
|
1731
1734
|
if (header) {
|
|
1732
|
-
const key = utils.findKey(this, header);
|
|
1735
|
+
const key = utils$1.findKey(this, header);
|
|
1733
1736
|
|
|
1734
1737
|
return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
|
|
1735
1738
|
}
|
|
@@ -1745,7 +1748,7 @@ class AxiosHeaders {
|
|
|
1745
1748
|
_header = normalizeHeader(_header);
|
|
1746
1749
|
|
|
1747
1750
|
if (_header) {
|
|
1748
|
-
const key = utils.findKey(self, _header);
|
|
1751
|
+
const key = utils$1.findKey(self, _header);
|
|
1749
1752
|
|
|
1750
1753
|
if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {
|
|
1751
1754
|
delete self[key];
|
|
@@ -1755,7 +1758,7 @@ class AxiosHeaders {
|
|
|
1755
1758
|
}
|
|
1756
1759
|
}
|
|
1757
1760
|
|
|
1758
|
-
if (utils.isArray(header)) {
|
|
1761
|
+
if (utils$1.isArray(header)) {
|
|
1759
1762
|
header.forEach(deleteHeader);
|
|
1760
1763
|
} else {
|
|
1761
1764
|
deleteHeader(header);
|
|
@@ -1784,8 +1787,8 @@ class AxiosHeaders {
|
|
|
1784
1787
|
const self = this;
|
|
1785
1788
|
const headers = {};
|
|
1786
1789
|
|
|
1787
|
-
utils.forEach(this, (value, header) => {
|
|
1788
|
-
const key = utils.findKey(headers, header);
|
|
1790
|
+
utils$1.forEach(this, (value, header) => {
|
|
1791
|
+
const key = utils$1.findKey(headers, header);
|
|
1789
1792
|
|
|
1790
1793
|
if (key) {
|
|
1791
1794
|
self[key] = normalizeValue(value);
|
|
@@ -1814,8 +1817,8 @@ class AxiosHeaders {
|
|
|
1814
1817
|
toJSON(asStrings) {
|
|
1815
1818
|
const obj = Object.create(null);
|
|
1816
1819
|
|
|
1817
|
-
utils.forEach(this, (value, header) => {
|
|
1818
|
-
value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);
|
|
1820
|
+
utils$1.forEach(this, (value, header) => {
|
|
1821
|
+
value != null && value !== false && (obj[header] = asStrings && utils$1.isArray(value) ? value.join(', ') : value);
|
|
1819
1822
|
});
|
|
1820
1823
|
|
|
1821
1824
|
return obj;
|
|
@@ -1862,7 +1865,7 @@ class AxiosHeaders {
|
|
|
1862
1865
|
}
|
|
1863
1866
|
}
|
|
1864
1867
|
|
|
1865
|
-
utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
1868
|
+
utils$1.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);
|
|
1866
1869
|
|
|
1867
1870
|
return this;
|
|
1868
1871
|
}
|
|
@@ -1871,7 +1874,7 @@ class AxiosHeaders {
|
|
|
1871
1874
|
AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
|
1872
1875
|
|
|
1873
1876
|
// reserved names hotfix
|
|
1874
|
-
utils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
1877
|
+
utils$1.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
1875
1878
|
let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`
|
|
1876
1879
|
return {
|
|
1877
1880
|
get: () => value,
|
|
@@ -1881,7 +1884,7 @@ utils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {
|
|
|
1881
1884
|
}
|
|
1882
1885
|
});
|
|
1883
1886
|
|
|
1884
|
-
utils.freezeMethods(AxiosHeaders);
|
|
1887
|
+
utils$1.freezeMethods(AxiosHeaders);
|
|
1885
1888
|
|
|
1886
1889
|
var AxiosHeaders$1 = AxiosHeaders;
|
|
1887
1890
|
|
|
@@ -1899,7 +1902,7 @@ function transformData(fns, response) {
|
|
|
1899
1902
|
const headers = AxiosHeaders$1.from(context.headers);
|
|
1900
1903
|
let data = context.data;
|
|
1901
1904
|
|
|
1902
|
-
utils.forEach(fns, function transform(fn) {
|
|
1905
|
+
utils$1.forEach(fns, function transform(fn) {
|
|
1903
1906
|
data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);
|
|
1904
1907
|
});
|
|
1905
1908
|
|
|
@@ -1927,7 +1930,7 @@ function CanceledError(message, config, request) {
|
|
|
1927
1930
|
this.name = 'CanceledError';
|
|
1928
1931
|
}
|
|
1929
1932
|
|
|
1930
|
-
utils.inherits(CanceledError, AxiosError, {
|
|
1933
|
+
utils$1.inherits(CanceledError, AxiosError, {
|
|
1931
1934
|
__CANCEL__: true
|
|
1932
1935
|
});
|
|
1933
1936
|
|
|
@@ -1955,53 +1958,44 @@ function settle(resolve, reject, response) {
|
|
|
1955
1958
|
}
|
|
1956
1959
|
}
|
|
1957
1960
|
|
|
1958
|
-
var cookies = platform.
|
|
1961
|
+
var cookies = platform.hasStandardBrowserEnv ?
|
|
1959
1962
|
|
|
1960
|
-
// Standard browser envs support document.cookie
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
const cookie = [];
|
|
1965
|
-
cookie.push(name + '=' + encodeURIComponent(value));
|
|
1963
|
+
// Standard browser envs support document.cookie
|
|
1964
|
+
{
|
|
1965
|
+
write(name, value, expires, path, domain, secure) {
|
|
1966
|
+
const cookie = [name + '=' + encodeURIComponent(value)];
|
|
1966
1967
|
|
|
1967
|
-
|
|
1968
|
-
cookie.push('expires=' + new Date(expires).toGMTString());
|
|
1969
|
-
}
|
|
1968
|
+
utils$1.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());
|
|
1970
1969
|
|
|
1971
|
-
|
|
1972
|
-
cookie.push('path=' + path);
|
|
1973
|
-
}
|
|
1970
|
+
utils$1.isString(path) && cookie.push('path=' + path);
|
|
1974
1971
|
|
|
1975
|
-
|
|
1976
|
-
cookie.push('domain=' + domain);
|
|
1977
|
-
}
|
|
1972
|
+
utils$1.isString(domain) && cookie.push('domain=' + domain);
|
|
1978
1973
|
|
|
1979
|
-
|
|
1980
|
-
cookie.push('secure');
|
|
1981
|
-
}
|
|
1974
|
+
secure === true && cookie.push('secure');
|
|
1982
1975
|
|
|
1983
|
-
|
|
1984
|
-
|
|
1976
|
+
document.cookie = cookie.join('; ');
|
|
1977
|
+
},
|
|
1985
1978
|
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1979
|
+
read(name) {
|
|
1980
|
+
const match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
|
|
1981
|
+
return (match ? decodeURIComponent(match[3]) : null);
|
|
1982
|
+
},
|
|
1990
1983
|
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
})() :
|
|
1984
|
+
remove(name) {
|
|
1985
|
+
this.write(name, '', Date.now() - 86400000);
|
|
1986
|
+
}
|
|
1987
|
+
}
|
|
1996
1988
|
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
|
|
2003
|
-
|
|
2004
|
-
|
|
1989
|
+
:
|
|
1990
|
+
|
|
1991
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
1992
|
+
{
|
|
1993
|
+
write() {},
|
|
1994
|
+
read() {
|
|
1995
|
+
return null;
|
|
1996
|
+
},
|
|
1997
|
+
remove() {}
|
|
1998
|
+
};
|
|
2005
1999
|
|
|
2006
2000
|
/**
|
|
2007
2001
|
* Determines whether the specified URL is absolute
|
|
@@ -2048,7 +2042,7 @@ function buildFullPath(baseURL, requestedURL) {
|
|
|
2048
2042
|
return requestedURL;
|
|
2049
2043
|
}
|
|
2050
2044
|
|
|
2051
|
-
var isURLSameOrigin = platform.
|
|
2045
|
+
var isURLSameOrigin = platform.hasStandardBrowserEnv ?
|
|
2052
2046
|
|
|
2053
2047
|
// Standard browser envs have full support of the APIs needed to test
|
|
2054
2048
|
// whether the request URL is of the same origin as current location.
|
|
@@ -2058,7 +2052,7 @@ var isURLSameOrigin = platform.isStandardBrowserEnv ?
|
|
|
2058
2052
|
let originURL;
|
|
2059
2053
|
|
|
2060
2054
|
/**
|
|
2061
|
-
* Parse a URL to discover
|
|
2055
|
+
* Parse a URL to discover its components
|
|
2062
2056
|
*
|
|
2063
2057
|
* @param {String} url The URL to be parsed
|
|
2064
2058
|
* @returns {Object}
|
|
@@ -2098,7 +2092,7 @@ var isURLSameOrigin = platform.isStandardBrowserEnv ?
|
|
|
2098
2092
|
* @returns {boolean} True if URL shares the same origin, otherwise false
|
|
2099
2093
|
*/
|
|
2100
2094
|
return function isURLSameOrigin(requestURL) {
|
|
2101
|
-
const parsed = (utils.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
|
2095
|
+
const parsed = (utils$1.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
|
|
2102
2096
|
return (parsed.protocol === originURL.protocol &&
|
|
2103
2097
|
parsed.host === originURL.host);
|
|
2104
2098
|
};
|
|
@@ -2203,7 +2197,7 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
2203
2197
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
2204
2198
|
let requestData = config.data;
|
|
2205
2199
|
const requestHeaders = AxiosHeaders$1.from(config.headers).normalize();
|
|
2206
|
-
|
|
2200
|
+
let {responseType, withXSRFToken} = config;
|
|
2207
2201
|
let onCanceled;
|
|
2208
2202
|
function done() {
|
|
2209
2203
|
if (config.cancelToken) {
|
|
@@ -2215,11 +2209,15 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
2215
2209
|
}
|
|
2216
2210
|
}
|
|
2217
2211
|
|
|
2218
|
-
|
|
2219
|
-
|
|
2212
|
+
let contentType;
|
|
2213
|
+
|
|
2214
|
+
if (utils$1.isFormData(requestData)) {
|
|
2215
|
+
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
2220
2216
|
requestHeaders.setContentType(false); // Let the browser set it
|
|
2221
|
-
} else {
|
|
2222
|
-
|
|
2217
|
+
} else if ((contentType = requestHeaders.getContentType()) !== false) {
|
|
2218
|
+
// fix semicolon duplication issue for ReactNative FormData implementation
|
|
2219
|
+
const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];
|
|
2220
|
+
requestHeaders.setContentType([type || 'multipart/form-data', ...tokens].join('; '));
|
|
2223
2221
|
}
|
|
2224
2222
|
}
|
|
2225
2223
|
|
|
@@ -2335,13 +2333,16 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
2335
2333
|
// Add xsrf header
|
|
2336
2334
|
// This is only done if running in a standard browser environment.
|
|
2337
2335
|
// Specifically not if we're in a web worker, or react-native.
|
|
2338
|
-
if
|
|
2339
|
-
|
|
2340
|
-
const xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath))
|
|
2341
|
-
&& config.xsrfCookieName && cookies.read(config.xsrfCookieName);
|
|
2336
|
+
if(platform.hasStandardBrowserEnv) {
|
|
2337
|
+
withXSRFToken && utils$1.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(config));
|
|
2342
2338
|
|
|
2343
|
-
if (
|
|
2344
|
-
|
|
2339
|
+
if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(fullPath))) {
|
|
2340
|
+
// Add xsrf header
|
|
2341
|
+
const xsrfValue = config.xsrfHeaderName && config.xsrfCookieName && cookies.read(config.xsrfCookieName);
|
|
2342
|
+
|
|
2343
|
+
if (xsrfValue) {
|
|
2344
|
+
requestHeaders.set(config.xsrfHeaderName, xsrfValue);
|
|
2345
|
+
}
|
|
2345
2346
|
}
|
|
2346
2347
|
}
|
|
2347
2348
|
|
|
@@ -2350,13 +2351,13 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
|
|
2350
2351
|
|
|
2351
2352
|
// Add headers to the request
|
|
2352
2353
|
if ('setRequestHeader' in request) {
|
|
2353
|
-
utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
2354
|
+
utils$1.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {
|
|
2354
2355
|
request.setRequestHeader(key, val);
|
|
2355
2356
|
});
|
|
2356
2357
|
}
|
|
2357
2358
|
|
|
2358
2359
|
// Add withCredentials to request if needed
|
|
2359
|
-
if (!utils.isUndefined(config.withCredentials)) {
|
|
2360
|
+
if (!utils$1.isUndefined(config.withCredentials)) {
|
|
2360
2361
|
request.withCredentials = !!config.withCredentials;
|
|
2361
2362
|
}
|
|
2362
2363
|
|
|
@@ -2411,8 +2412,8 @@ const knownAdapters = {
|
|
|
2411
2412
|
xhr: xhrAdapter
|
|
2412
2413
|
};
|
|
2413
2414
|
|
|
2414
|
-
utils.forEach(knownAdapters, (fn, value) => {
|
|
2415
|
-
if(fn) {
|
|
2415
|
+
utils$1.forEach(knownAdapters, (fn, value) => {
|
|
2416
|
+
if (fn) {
|
|
2416
2417
|
try {
|
|
2417
2418
|
Object.defineProperty(fn, 'name', {value});
|
|
2418
2419
|
} catch (e) {
|
|
@@ -2422,38 +2423,56 @@ utils.forEach(knownAdapters, (fn, value) => {
|
|
|
2422
2423
|
}
|
|
2423
2424
|
});
|
|
2424
2425
|
|
|
2426
|
+
const renderReason = (reason) => `- ${reason}`;
|
|
2427
|
+
|
|
2428
|
+
const isResolvedHandle = (adapter) => utils$1.isFunction(adapter) || adapter === null || adapter === false;
|
|
2429
|
+
|
|
2425
2430
|
var adapters = {
|
|
2426
2431
|
getAdapter: (adapters) => {
|
|
2427
|
-
adapters = utils.isArray(adapters) ? adapters : [adapters];
|
|
2432
|
+
adapters = utils$1.isArray(adapters) ? adapters : [adapters];
|
|
2428
2433
|
|
|
2429
2434
|
const {length} = adapters;
|
|
2430
2435
|
let nameOrAdapter;
|
|
2431
2436
|
let adapter;
|
|
2432
2437
|
|
|
2438
|
+
const rejectedReasons = {};
|
|
2439
|
+
|
|
2433
2440
|
for (let i = 0; i < length; i++) {
|
|
2434
2441
|
nameOrAdapter = adapters[i];
|
|
2435
|
-
|
|
2442
|
+
let id;
|
|
2443
|
+
|
|
2444
|
+
adapter = nameOrAdapter;
|
|
2445
|
+
|
|
2446
|
+
if (!isResolvedHandle(nameOrAdapter)) {
|
|
2447
|
+
adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];
|
|
2448
|
+
|
|
2449
|
+
if (adapter === undefined) {
|
|
2450
|
+
throw new AxiosError(`Unknown adapter '${id}'`);
|
|
2451
|
+
}
|
|
2452
|
+
}
|
|
2453
|
+
|
|
2454
|
+
if (adapter) {
|
|
2436
2455
|
break;
|
|
2437
2456
|
}
|
|
2457
|
+
|
|
2458
|
+
rejectedReasons[id || '#' + i] = adapter;
|
|
2438
2459
|
}
|
|
2439
2460
|
|
|
2440
2461
|
if (!adapter) {
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
'
|
|
2462
|
+
|
|
2463
|
+
const reasons = Object.entries(rejectedReasons)
|
|
2464
|
+
.map(([id, state]) => `adapter ${id} ` +
|
|
2465
|
+
(state === false ? 'is not supported by the environment' : 'is not available in the build')
|
|
2445
2466
|
);
|
|
2446
|
-
}
|
|
2447
2467
|
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
`Unknown adapter '${nameOrAdapter}'`
|
|
2452
|
-
);
|
|
2453
|
-
}
|
|
2468
|
+
let s = length ?
|
|
2469
|
+
(reasons.length > 1 ? 'since :\n' + reasons.map(renderReason).join('\n') : ' ' + renderReason(reasons[0])) :
|
|
2470
|
+
'as no adapter specified';
|
|
2454
2471
|
|
|
2455
|
-
|
|
2456
|
-
|
|
2472
|
+
throw new AxiosError(
|
|
2473
|
+
`There is no suitable adapter to dispatch the request ` + s,
|
|
2474
|
+
'ERR_NOT_SUPPORT'
|
|
2475
|
+
);
|
|
2457
2476
|
}
|
|
2458
2477
|
|
|
2459
2478
|
return adapter;
|
|
@@ -2551,11 +2570,11 @@ function mergeConfig(config1, config2) {
|
|
|
2551
2570
|
const config = {};
|
|
2552
2571
|
|
|
2553
2572
|
function getMergedValue(target, source, caseless) {
|
|
2554
|
-
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
|
2555
|
-
return utils.merge.call({caseless}, target, source);
|
|
2556
|
-
} else if (utils.isPlainObject(source)) {
|
|
2557
|
-
return utils.merge({}, source);
|
|
2558
|
-
} else if (utils.isArray(source)) {
|
|
2573
|
+
if (utils$1.isPlainObject(target) && utils$1.isPlainObject(source)) {
|
|
2574
|
+
return utils$1.merge.call({caseless}, target, source);
|
|
2575
|
+
} else if (utils$1.isPlainObject(source)) {
|
|
2576
|
+
return utils$1.merge({}, source);
|
|
2577
|
+
} else if (utils$1.isArray(source)) {
|
|
2559
2578
|
return source.slice();
|
|
2560
2579
|
}
|
|
2561
2580
|
return source;
|
|
@@ -2563,25 +2582,25 @@ function mergeConfig(config1, config2) {
|
|
|
2563
2582
|
|
|
2564
2583
|
// eslint-disable-next-line consistent-return
|
|
2565
2584
|
function mergeDeepProperties(a, b, caseless) {
|
|
2566
|
-
if (!utils.isUndefined(b)) {
|
|
2585
|
+
if (!utils$1.isUndefined(b)) {
|
|
2567
2586
|
return getMergedValue(a, b, caseless);
|
|
2568
|
-
} else if (!utils.isUndefined(a)) {
|
|
2587
|
+
} else if (!utils$1.isUndefined(a)) {
|
|
2569
2588
|
return getMergedValue(undefined, a, caseless);
|
|
2570
2589
|
}
|
|
2571
2590
|
}
|
|
2572
2591
|
|
|
2573
2592
|
// eslint-disable-next-line consistent-return
|
|
2574
2593
|
function valueFromConfig2(a, b) {
|
|
2575
|
-
if (!utils.isUndefined(b)) {
|
|
2594
|
+
if (!utils$1.isUndefined(b)) {
|
|
2576
2595
|
return getMergedValue(undefined, b);
|
|
2577
2596
|
}
|
|
2578
2597
|
}
|
|
2579
2598
|
|
|
2580
2599
|
// eslint-disable-next-line consistent-return
|
|
2581
2600
|
function defaultToConfig2(a, b) {
|
|
2582
|
-
if (!utils.isUndefined(b)) {
|
|
2601
|
+
if (!utils$1.isUndefined(b)) {
|
|
2583
2602
|
return getMergedValue(undefined, b);
|
|
2584
|
-
} else if (!utils.isUndefined(a)) {
|
|
2603
|
+
} else if (!utils$1.isUndefined(a)) {
|
|
2585
2604
|
return getMergedValue(undefined, a);
|
|
2586
2605
|
}
|
|
2587
2606
|
}
|
|
@@ -2606,6 +2625,7 @@ function mergeConfig(config1, config2) {
|
|
|
2606
2625
|
timeout: defaultToConfig2,
|
|
2607
2626
|
timeoutMessage: defaultToConfig2,
|
|
2608
2627
|
withCredentials: defaultToConfig2,
|
|
2628
|
+
withXSRFToken: defaultToConfig2,
|
|
2609
2629
|
adapter: defaultToConfig2,
|
|
2610
2630
|
responseType: defaultToConfig2,
|
|
2611
2631
|
xsrfCookieName: defaultToConfig2,
|
|
@@ -2626,16 +2646,16 @@ function mergeConfig(config1, config2) {
|
|
|
2626
2646
|
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
|
2627
2647
|
};
|
|
2628
2648
|
|
|
2629
|
-
utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
2649
|
+
utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
|
2630
2650
|
const merge = mergeMap[prop] || mergeDeepProperties;
|
|
2631
2651
|
const configValue = merge(config1[prop], config2[prop], prop);
|
|
2632
|
-
(utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
2652
|
+
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
2633
2653
|
});
|
|
2634
2654
|
|
|
2635
2655
|
return config;
|
|
2636
2656
|
}
|
|
2637
2657
|
|
|
2638
|
-
const VERSION = "1.
|
|
2658
|
+
const VERSION = "1.6.2";
|
|
2639
2659
|
|
|
2640
2660
|
const validators$1 = {};
|
|
2641
2661
|
|
|
@@ -2773,7 +2793,7 @@ class Axios {
|
|
|
2773
2793
|
}
|
|
2774
2794
|
|
|
2775
2795
|
if (paramsSerializer != null) {
|
|
2776
|
-
if (utils.isFunction(paramsSerializer)) {
|
|
2796
|
+
if (utils$1.isFunction(paramsSerializer)) {
|
|
2777
2797
|
config.paramsSerializer = {
|
|
2778
2798
|
serialize: paramsSerializer
|
|
2779
2799
|
};
|
|
@@ -2789,12 +2809,12 @@ class Axios {
|
|
|
2789
2809
|
config.method = (config.method || this.defaults.method || 'get').toLowerCase();
|
|
2790
2810
|
|
|
2791
2811
|
// Flatten headers
|
|
2792
|
-
let contextHeaders = headers && utils.merge(
|
|
2812
|
+
let contextHeaders = headers && utils$1.merge(
|
|
2793
2813
|
headers.common,
|
|
2794
2814
|
headers[config.method]
|
|
2795
2815
|
);
|
|
2796
2816
|
|
|
2797
|
-
headers && utils.forEach(
|
|
2817
|
+
headers && utils$1.forEach(
|
|
2798
2818
|
['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
|
|
2799
2819
|
(method) => {
|
|
2800
2820
|
delete headers[method];
|
|
@@ -2881,7 +2901,7 @@ class Axios {
|
|
|
2881
2901
|
}
|
|
2882
2902
|
|
|
2883
2903
|
// Provide aliases for supported request methods
|
|
2884
|
-
utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
2904
|
+
utils$1.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
|
|
2885
2905
|
/*eslint func-names:0*/
|
|
2886
2906
|
Axios.prototype[method] = function(url, config) {
|
|
2887
2907
|
return this.request(mergeConfig(config || {}, {
|
|
@@ -2892,7 +2912,7 @@ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData
|
|
|
2892
2912
|
};
|
|
2893
2913
|
});
|
|
2894
2914
|
|
|
2895
|
-
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
2915
|
+
utils$1.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
2896
2916
|
/*eslint func-names:0*/
|
|
2897
2917
|
|
|
2898
2918
|
function generateHTTPMethod(isForm) {
|
|
@@ -3068,7 +3088,7 @@ function spread(callback) {
|
|
|
3068
3088
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
3069
3089
|
*/
|
|
3070
3090
|
function isAxiosError(payload) {
|
|
3071
|
-
return utils.isObject(payload) && (payload.isAxiosError === true);
|
|
3091
|
+
return utils$1.isObject(payload) && (payload.isAxiosError === true);
|
|
3072
3092
|
}
|
|
3073
3093
|
|
|
3074
3094
|
const HttpStatusCode = {
|
|
@@ -3155,10 +3175,10 @@ function createInstance(defaultConfig) {
|
|
|
3155
3175
|
const instance = bind(Axios$1.prototype.request, context);
|
|
3156
3176
|
|
|
3157
3177
|
// Copy axios.prototype to instance
|
|
3158
|
-
utils.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});
|
|
3178
|
+
utils$1.extend(instance, Axios$1.prototype, context, {allOwnKeys: true});
|
|
3159
3179
|
|
|
3160
3180
|
// Copy context to instance
|
|
3161
|
-
utils.extend(instance, context, null, {allOwnKeys: true});
|
|
3181
|
+
utils$1.extend(instance, context, null, {allOwnKeys: true});
|
|
3162
3182
|
|
|
3163
3183
|
// Factory for creating new instances
|
|
3164
3184
|
instance.create = function create(instanceConfig) {
|
|
@@ -3202,7 +3222,7 @@ axios.mergeConfig = mergeConfig;
|
|
|
3202
3222
|
|
|
3203
3223
|
axios.AxiosHeaders = AxiosHeaders$1;
|
|
3204
3224
|
|
|
3205
|
-
axios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
3225
|
+
axios.formToJSON = thing => formDataToJSON(utils$1.isHTMLForm(thing) ? new FormData(thing) : thing);
|
|
3206
3226
|
|
|
3207
3227
|
axios.getAdapter = adapters.getAdapter;
|
|
3208
3228
|
|