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

Function taskPostUrl

jd_zooCollect.js:122–135  ·  view source on GitHub ↗
(functionId, body = {})

Source from the content-addressed store, hash-verified

120}
121
122function taskPostUrl(functionId, body = {}) {
123 return {
124 url: `${JD_API_HOST}?functionId=${functionId}`,
125 body: `functionId=${functionId}&body=${JSON.stringify(body)}&client=wh5&clientVersion=1.0.0`,
126 headers: {
127 '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"),
128 'Content-Type': 'application/x-www-form-urlencoded',
129 'Host': 'api.m.jd.com',
130 'Cookie': cookie,
131 'Origin': 'https://wbbny.m.jd.com',
132 'Referer': 'https://wbbny.m.jd.com/babelDiy/Zeus/2s7hhSTbhMgxpGoa9JDnbDzJTaBB/index.html',
133 }
134 }
135}
136
137function jsonParse(str) {
138 if (typeof str == "string") {

Callers 2

getHomeDataFunction · 0.70

Calls 2

isNodeMethod · 0.45
getdataMethod · 0.45

Tested by

no test coverage detected