MCPcopy Create free account
hub / github.com/Semporia/Scripts / taskUrl

Function taskUrl

jd_blueCoin.js:468–479  ·  view source on GitHub ↗
(function_id, body = {})

Source from the content-addressed store, hash-verified

466 }
467}
468function taskUrl(function_id, body = {}) {
469 return {
470 url: `${JD_API_HOST}&functionId=${function_id}&clientVersion=8.0.0&client=m&body=${escape(JSON.stringify(body))}&t=${Date.now()}`,
471 headers: {
472 'User-Agent': $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"),
473 'Host': 'api.m.jd.com',
474 'Cookie': cookie,
475 'Referer': 'https://jdsupermarket.jd.com/game',
476 'Origin': 'https://jdsupermarket.jd.com',
477 }
478 }
479}
480function jsonParse(str) {
481 if (typeof str == "string") {
482 try {

Callers 1

smtgHomeFunction · 0.70

Calls 2

isNodeMethod · 0.45
getdataMethod · 0.45

Tested by

no test coverage detected