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

Function taskUrl

jd_live.js:258–269  ·  view source on GitHub ↗
(function_id, body = {})

Source from the content-addressed store, hash-verified

256 }
257}
258function taskUrl(function_id, body = {}) {
259 return {
260 url: `${JD_API_HOST}?functionId=${function_id}&appid=h5-live&body=${escape(JSON.stringify(body))}&v=${new Date().getTime() + new Date().getTimezoneOffset()*60*1000 + 8*60*60*1000}`,
261 headers: {
262 "Cookie": cookie,
263 "origin": "https://h5.m.jd.com",
264 "referer": "https://h5.m.jd.com/",
265 'Content-Type': 'application/x-www-form-urlencoded',
266 "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"),
267 }
268 }
269}
270
271function TotalBean() {
272 return new Promise(async resolve => {

Callers 2

getTaskListFunction · 0.70
signFunction · 0.70

Calls 2

isNodeMethod · 0.45
getdataMethod · 0.45

Tested by

no test coverage detected