MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / request

Function request

wxapp/ydyc.js:65–79  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

63}
64
65async function request(options) {
66 const res = await axios.request({
67 timeout: 25000,
68 validateStatus: () => true,
69 ...options,
70 headers: {
71 "User-Agent": USER_AGENT,
72 Accept: "application/json, text/plain, */*",
73 "content-type": "application/json",
74 Referer: `https://servicewechat.com/${APP.appid}/${APP.version}/page-frame.html`,
75 ...(options.headers || {}),
76 },
77 });
78 return { status: res.status, data: res.data, headers: res.headers || {} };
79}
80
81async function getWxCode(openid) {
82 if (!WX_AUTH) throw new Error("未配置 wx_auth,无法从 wx_server 获取 code");

Callers 2

getWxCodeFunction · 0.70
apiMethod · 0.70

Calls 1

requestMethod · 0.45

Tested by

no test coverage detected