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

Function taskPostUrl

activity/jd_global.js:406–422  ·  view source on GitHub ↗
(function_id, body = {}, function_id2)

Source from the content-addressed store, hash-verified

404}
405
406function taskPostUrl(function_id, body = {}, function_id2) {
407 let url = `${JD_API_HOST}`;
408 if (function_id2) {
409 url += `?functionId=${function_id2}`;
410 }
411 return {
412 url,
413 body: `functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0`,
414 headers: {
415 "Cookie": cookie,
416 "origin": "https://h5.m.jd.com",
417 "referer": "https://h5.m.jd.com/",
418 'Content-Type': 'application/x-www-form-urlencoded',
419 "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")
420 }
421 }
422}
423
424function TotalBean() {
425 return new Promise(async resolve => {

Callers

nothing calls this directly

Calls 2

isNodeMethod · 0.45
getdataMethod · 0.45

Tested by

no test coverage detected