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

Function taskPostUrl

jd_live.js:244–257  ·  view source on GitHub ↗
(function_id, body = {}, url=null)

Source from the content-addressed store, hash-verified

242 })
243}
244function taskPostUrl(function_id, body = {}, url=null) {
245 if(!url) url = `${JD_API_HOST}?functionId=${function_id}`
246 return {
247 url: url,
248 body: body,
249 headers: {
250 "Cookie": cookie,
251 "origin": "https://h5.m.jd.com",
252 "referer": "https://h5.m.jd.com/",
253 'Content-Type': 'application/x-www-form-urlencoded',
254 "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"),
255 }
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}`,

Callers 4

superTaskFunction · 0.70
viewTaskFunction · 0.70
shareTaskFunction · 0.70
awardTaskFunction · 0.70

Calls 2

isNodeMethod · 0.45
getdataMethod · 0.45

Tested by

no test coverage detected