(url, options)
| 75 | } |
| 76 | |
| 77 | const 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 | |
| 94 | module.exports = { getBuffer, getGroupAdmins, getRandom, h2k, isUrl, Json, runtime, sleep , fetchJson} |
nothing calls this directly
no outgoing calls
no test coverage detected