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

Function getPostBody

jd_summer_movement_help.js:295–309  ·  view source on GitHub ↗
(type)

Source from the content-addressed store, hash-verified

293}
294
295async function getPostBody(type) {
296 return new Promise(async resolve => {
297 let taskBody = '';
298 try {
299 const log = await getBody()
300 if (type === 'help' || type === 'shHelp') {
301 taskBody = `functionId=olympicgames_assist&body=${JSON.stringify({"inviteId":$.inviteId,"type": "confirm","ss" :log})}&client=wh5&clientVersion=1.0.0&appid=${$.appid}`
302 }
303 } catch (e) {
304 $.logErr(e)
305 } finally {
306 resolve(taskBody);
307 }
308 })
309}
310
311async function getPostRequest(type, body) {
312 let url = `https://api.m.jd.com/client.action?advId=${type}`;

Callers 1

takePostRequestFunction · 0.70

Calls 2

getBodyFunction · 0.70
logErrMethod · 0.45

Tested by

no test coverage detected