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

Function request

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

Source from the content-addressed store, hash-verified

81}
82
83async function request(options) {
84 const res = await axios.request({
85 timeout: 20000,
86 validateStatus: () => true,
87 ...options,
88 headers: {
89 "User-Agent": USER_AGENT,
90 Accept: "application/json, text/plain, */*",
91 ...(options.headers || {}),
92 },
93 });
94 return { status: res.status, data: res.data || {}, headers: res.headers || {} };
95}
96
97async function getWxCode(openid) {
98 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