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

Function request

wxapp/txdt.js:95–108  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

93}
94
95async function request(options) {
96 const res = await axios.request({
97 timeout: 20000,
98 validateStatus: () => true,
99 ...options,
100 headers: {
101 "User-Agent": USER_AGENT,
102 Accept: "application/json, text/plain, */*",
103 Referer: `https://servicewechat.com/${APP.appid}/${APP.version}/page-frame.html`,
104 ...(options.headers || {}),
105 },
106 });
107 return { status: res.status, headers: res.headers || {}, data: res.data };
108}
109
110async function getWxCode(openid) {
111 if (!WX_AUTH) throw new Error("未配置 wx_auth,无法从 wx_server 获取 code");

Callers 4

getWxCodeFunction · 0.70
miniLoginMethod · 0.70
queryUserMethod · 0.70
mapApiMethod · 0.70

Calls 1

requestMethod · 0.45

Tested by

no test coverage detected