MCPcopy Create free account
hub / github.com/Maccoder3/MAC-MD / fetchJson

Function fetchJson

lib/function.js:77–92  ·  view source on GitHub ↗
(url, options)

Source from the content-addressed store, hash-verified

75}
76
77const fetchJson = async (url, options) => {
78 try {
79 options ? options : {}
80 const res = await axios({
81 method: 'GET',
82 url: url,
83 headers: {
84 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36'
85 },
86 ...options
87 })
88 return res.data
89 } catch (err) {
90 return err
91 }
92}
93
94module.exports = { getBuffer, getGroupAdmins, getRandom, h2k, isUrl, Json, runtime, sleep , fetchJson}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected