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})),
|
||||||
TEXT: async (url = "", options) => await (await fetch(url, options)).text(),
|
TEXT: async (url = "", options) => await (await axios({url: url, ...options})),
|
||||||
BUFFER: async (url = "", options) => Buffer.from(await (await fetch(url, options)).arrayBuffer()),
|
BUFFER: async (url = "", options) => Buffer.from(await (await axios({url, ...options, responseType: "arraybuffer"}))),
|
||||||
}
|
}
|
8314
package-lock.json
generated
8314
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",
|
||||||
|
Reference in New Issue
Block a user