Axios request #180

Closed
Sirherobrine23 wants to merge 5 commits from Axios into main
4 changed files with 90 additions and 8294 deletions

View File

@ -1,6 +1,6 @@
if (typeof fetch === "undefined") global.fetch = require("node-fetch");
const axios = require("axios").default;
module.exports = {
JSON: async (url = "", options) => await (await fetch(url, options)).json(),
TEXT: async (url = "", options) => await (await fetch(url, options)).text(),
BUFFER: async (url = "", options) => Buffer.from(await (await fetch(url, options)).arrayBuffer()),
JSON: async (url = "", options) => await (await axios({url: url, ...options})).data,
TEXT: async (url = "", options) => await (await axios({url: url, ...options})).data,
BUFFER: async (url = "", options) => Buffer.from((await axios({url: url, ...options, responseType: "arraybuffer"})).data)
}

8350
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -55,6 +55,7 @@
"dependencies": {
"@azure/storage-blob": "^12.6.0",
"adm-zip": "^0.5.1",
"axios": "^0.21.3",
"body-parser": "^1.19.0",
"cli-color": "^2.0.0",
"cors": "^2.8.5",
@ -67,7 +68,6 @@
"js-yaml": "^4.1.0",
"minimist": "^1.2.5",
"node-cron": "^3.0.0",
"node-fetch": "2.6.1",
"oci-sdk": "^2.0.0",
"open": "^8.0.0",
"properties-to-json": "^0.2.1",
@ -76,7 +76,7 @@
"uuid": "^8.3.2"
},
"devDependencies": {
"docker-run_build": "github:Sirherobrine23/Docker-Run_Build#main",
"docker-run_build": "github:Sirherobrine23/Docker-Run_Build",
"eslint": "^7.19.0",
"husky": "^7.0.0",
"nexe": "*",