MCPcopy Create free account
hub / github.com/Huibq/keep-alive / httpFetch

Function httpFetch

render_api.js:19–26  ·  view source on GitHub ↗
(url, options = { method: 'GET' })

Source from the content-addressed store, hash-verified

17const MUSIC_SOURCE = Object.keys(MUSIC_QUALITY)
18const { EVENT_NAMES, request, on, send, utils, env, version } = globalThis.lx
19const httpFetch = (url, options = { method: 'GET' }) => {
20 return new Promise((resolve, reject) => {
21 request(url, options, (err, resp) => {
22 if (err) return reject(err)
23 resolve(resp)
24 })
25 })
26}
27const handleGetMusicUrl = async (source, musicInfo, quality) => {
28 const songId = musicInfo.hash ?? musicInfo.songmid
29

Callers 1

handleGetMusicUrlFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected