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

Function taskUrl

jd_car.js:253–268  ·  view source on GitHub ↗
(function_id, body = {})

Source from the content-addressed store, hash-verified

251}
252
253function taskUrl(function_id, body = {}) {
254 return {
255 url: `${JD_API_HOST}${function_id}?timestamp=${new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000}`,
256 headers: {
257 "Accept": "*/*",
258 "Accept-Encoding": "gzip, deflate, br",
259 "Accept-Language": "zh-cn",
260 "Connection": "keep-alive",
261 "Content-Type": "application/x-www-form-urlencoded",
262 "Host": "car-member.jd.com",
263 "Referer": "https://h5.m.jd.com/babelDiy/Zeus/44bjzCpzH9GpspWeBzYSqBA7jEtP/index.html",
264 "Cookie": cookie,
265 "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"),
266 }
267 }
268}
269
270function taskPostUrl(function_id, body = {}) {
271 return {

Callers 4

checkFunction · 0.70
signFunction · 0.70
missionFunction · 0.70
getPointFunction · 0.70

Calls 2

isNodeMethod · 0.45
getdataMethod · 0.45

Tested by

no test coverage detected