MCPcopy Create free account
hub / github.com/Toulu-debug/enen / api

Function api

jd_bean_box.ts:79–91  ·  view source on GitHub ↗
(fn: string, body: object)

Source from the content-addressed store, hash-verified

77})()
78
79async function api(fn: string, body: object) {
80 let {data}: any = await axios.post(`https://api.m.jd.com/client.action?functionId=${fn}`,
81 `body=${encodeURIComponent(JSON.stringify(body))}&appid=ld&client=apple&clientVersion=10.0.8&uuid=${uuid}&openudid=${uuid}`, {
82 headers: {
83 'Host': 'api.m.jd.com',
84 'content-type': 'application/x-www-form-urlencoded',
85 'referer': '',
86 'user-agent': 'JD4iPhone/167863%20(iPhone;%20iOS;%20Scale/3.00)',
87 'Cookie': cookie
88 }
89 })
90 return data
91}

Callers 1

jd_bean_box.tsFile · 0.70

Calls 1

postMethod · 0.45

Tested by

no test coverage detected