From 16da8f48c7328c334a5c0d863078fd00257ae6b4 Mon Sep 17 00:00:00 2001 From: Minteck Date: Sun, 8 May 2022 13:18:04 +0200 Subject: Initial commit --- fetcher/node_modules/axios/lib/axios.js | 64 +++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 fetcher/node_modules/axios/lib/axios.js (limited to 'fetcher/node_modules/axios/lib/axios.js') diff --git a/fetcher/node_modules/axios/lib/axios.js b/fetcher/node_modules/axios/lib/axios.js new file mode 100644 index 0000000..cf6583c --- /dev/null +++ b/fetcher/node_modules/axios/lib/axios.js @@ -0,0 +1,64 @@ +'use strict'; + +var utils = require('./utils'); +var bind = require('./helpers/bind'); +var Axios = require('./core/Axios'); +var mergeConfig = require('./core/mergeConfig'); +var defaults = require('./defaults'); + +/** + * Create an instance of Axios + * + * @param {Object} defaultConfig The default config for the instance + * @return {Axios} A new instance of Axios + */ +function createInstance(defaultConfig) { + var context = new Axios(defaultConfig); + var instance = bind(Axios.prototype.request, context); + + // Copy axios.prototype to instance + utils.extend(instance, Axios.prototype, context); + + // Copy context to instance + utils.extend(instance, context); + + // Factory for creating new instances + instance.create = function create(instanceConfig) { + return createInstance(mergeConfig(defaultConfig, instanceConfig)); + }; + + return instance; +} + +// Create the default instance to be exported +var axios = createInstance(defaults); + +// Expose Axios class to allow class inheritance +axios.Axios = Axios; + +// Expose Cancel & CancelToken +axios.CanceledError = require('./cancel/CanceledError'); +axios.CancelToken = require('./cancel/CancelToken'); +axios.isCancel = require('./cancel/isCancel'); +axios.VERSION = require('./env/data').version; +axios.toFormData = require('./helpers/toFormData'); + +// Expose AxiosError class +axios.AxiosError = require('../lib/core/AxiosError'); + +// alias for CanceledError for backward compatibility +axios.Cancel = axios.CanceledError; + +// Expose all/spread +axios.all = function all(promises) { + return Promise.all(promises); +}; +axios.spread = require('./helpers/spread'); + +// Expose isAxiosError +axios.isAxiosError = require('./helpers/isAxiosError'); + +module.exports = axios; + +// Allow use of default import syntax in TypeScript +module.exports.default = axios; -- cgit