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

Function taskPostUrl

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

Source from the content-addressed store, hash-verified

268}
269
270function taskPostUrl(function_id, body = {}) {
271 return {
272 url: `${JD_API_HOST}${function_id}?timestamp=${new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000}`,
273 body: JSON.stringify(body),
274 headers: {
275 "Accept": "*/*",
276 "Accept-Encoding": "gzip, deflate, br",
277 "Accept-Language": "zh-cn",
278 "Connection": "keep-alive",
279 "Content-Type": "application/json;charset=UTF-8",
280 "Host": "car-member.jd.com",
281 "activityid": "39443aee3ff74fcb806a6f755240d127",
282 "Referer": "https://h5.m.jd.com/babelDiy/Zeus/44bjzCpzH9GpspWeBzYSqBA7jEtP/index.html",
283 "Cookie": cookie,
284 "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"),
285 }
286 }
287}
288
289function TotalBean() {
290 return new Promise(async resolve => {

Callers 2

doMissionFunction · 0.70
receiveMissionFunction · 0.70

Calls 2

isNodeMethod · 0.45
getdataMethod · 0.45

Tested by

no test coverage detected