Axios request #180

Closed
Sirherobrine23 wants to merge 5 commits from Axios into main
3 changed files with 65 additions and 8261 deletions
Showing only changes of commit d9f0a16dba - Show all commits

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})),
TEXT: async (url = "", options) => await (await axios({url: url, ...options})),
BUFFER: async (url = "", options) => Buffer.from(await (await axios({url, ...options, responseType: "arraybuffer"}))),
}

8314
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",