Axios request #180
@ -1,6 +1,6 @@
|
|||||||
if (typeof fetch === "undefined") global.fetch = require("node-fetch");
|
const axios = require("axios").default;
|
||||||
module.exports = {
|
module.exports = {
|
||||||
JSON: async (url = "", options) => await (await fetch(url, options)).json(),
|
JSON: async (url = "", options) => await (await axios({url: url, ...options})).data,
|
||||||
TEXT: async (url = "", options) => await (await fetch(url, options)).text(),
|
TEXT: async (url = "", options) => await (await axios({url: url, ...options})).data,
|
||||||
BUFFER: async (url = "", options) => Buffer.from(await (await fetch(url, options)).arrayBuffer()),
|
BUFFER: async (url = "", options) => Buffer.from((await axios({url: url, ...options, responseType: "arraybuffer"})).data)
|
||||||
}
|
}
|
8350
package-lock.json
generated
8350
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -55,6 +55,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@azure/storage-blob": "^12.6.0",
|
"@azure/storage-blob": "^12.6.0",
|
||||||
"adm-zip": "^0.5.1",
|
"adm-zip": "^0.5.1",
|
||||||
|
"axios": "^0.21.3",
|
||||||
"body-parser": "^1.19.0",
|
"body-parser": "^1.19.0",
|
||||||
"cli-color": "^2.0.0",
|
"cli-color": "^2.0.0",
|
||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
@ -67,7 +68,6 @@
|
|||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"minimist": "^1.2.5",
|
"minimist": "^1.2.5",
|
||||||
"node-cron": "^3.0.0",
|
"node-cron": "^3.0.0",
|
||||||
"node-fetch": "2.6.1",
|
|
||||||
"oci-sdk": "^2.0.0",
|
"oci-sdk": "^2.0.0",
|
||||||
"open": "^8.0.0",
|
"open": "^8.0.0",
|
||||||
"properties-to-json": "^0.2.1",
|
"properties-to-json": "^0.2.1",
|
||||||
@ -76,7 +76,7 @@
|
|||||||
"uuid": "^8.3.2"
|
"uuid": "^8.3.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"docker-run_build": "github:Sirherobrine23/Docker-Run_Build#main",
|
"docker-run_build": "github:Sirherobrine23/Docker-Run_Build",
|
||||||
"eslint": "^7.19.0",
|
"eslint": "^7.19.0",
|
||||||
"husky": "^7.0.0",
|
"husky": "^7.0.0",
|
||||||
"nexe": "*",
|
"nexe": "*",
|
||||||
|
Reference in New Issue
Block a user