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

Function taskPostUrl

activity/jd_jdh.js:339–352  ·  view source on GitHub ↗
(function_id, body = {})

Source from the content-addressed store, hash-verified

337}
338
339function taskPostUrl(function_id, body = {}) {
340 return {
341 url: `${JD_API_HOST}?functionId=${function_id}`,
342 body: body,
343 headers: {
344 "Cookie": cookie,
345 'Content-Type': 'application/x-www-form-urlencoded',
346 'accept': 'application/json, text/plain, */*',
347 'origin': 'https://hlc.m.jd.com',
348 'referer': 'https://hlc.m.jd.com/Question_Answer_Rumour/answerComplete',
349 "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : "jdhapp;iPhone;9.2.7;14.2;network/wifi;lang/zh_CN;model/iPhone10,2;appBuild/1206;pv/2.1;apprpd/;usc/;jdv/0|;umd/;psq/4;ucp/;app_device/IOS;utr/;ref/;adk/;ads/;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1") : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdhapp;iPhone;9.2.7;14.2;network/wifi;lang/zh_CN;model/iPhone10,2;appBuild/1206;pv/2.1;apprpd/;usc/;jdv/0|;umd/;psq/4;ucp/;app_device/IOS;utr/;ref/;adk/;ads/;Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"),
350 }
351 }
352}
353function taskUrl(function_id, body = {}) {
354 return {
355 url: `${JD_API_HOST}?functionId=${function_id}&appid=JDHAPP&clientVersion=2.1.7&body=${escape(JSON.stringify(body))}`,

Callers

nothing calls this directly

Calls 2

isNodeMethod · 0.45
getdataMethod · 0.45

Tested by

no test coverage detected