MCPcopy Create free account
hub / github.com/NobyDa/Script / get

Function get

Surge/JS/Bili_Auto_Regions.js:338–351  ·  view source on GitHub ↗
(options, callback)

Source from the content-addressed store, hash-verified

336 }
337 }
338 const get = (options, callback) => {
339 if (isQuanX) {
340 options["method"] = "GET";
341 $task.fetch(options).then(response => {
342 callback(null, adapterStatus(response), response.body)
343 }, reason => callback(reason.error, null, null))
344 }
345 if (isHTTP) {
346 if (isSurge) options.headers['X-Surge-Skip-Scripting'] = false;
347 $httpClient.get(options, (error, response, body) => {
348 callback(error, adapterStatus(response), body)
349 })
350 }
351 }
352 return {
353 getPolicy,
354 setPolicy,

Callers

nothing calls this directly

Calls 2

adapterStatusFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected