MCPcopy Create free account
hub / github.com/Moli-X/Resources / get

Function get

Script/JD/JdPrice.js:256–272  ·  view source on GitHub ↗
(options, callback)

Source from the content-addressed store, hash-verified

254 return response
255 }
256 const get = (options, callback) => {
257 if (isQuanX) {
258 if (typeof options == "string") options = { url: options }
259 options["method"] = "GET"
260 $task.fetch(options).then(response => {
261 callback(null, adapterStatus(response), response.body)
262 }, reason => callback(reason.error, null, null))
263 }
264 if (isSurge) $httpClient.get(options, (error, response, body) => {
265 callback(error, adapterStatus(response), body)
266 })
267 if (node) {
268 node.request(options, (error, response, body) => {
269 callback(error, adapterStatus(response), body)
270 })
271 }
272 }
273 const post = (options, callback) => {
274 if (isQuanX) {
275 if (typeof options == "string") options = { url: options }

Callers

nothing calls this directly

Calls 4

adapterStatusFunction · 0.70
fetchMethod · 0.45
getMethod · 0.45
requestMethod · 0.45

Tested by

no test coverage detected