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

Function request

wxapp/tclx_lc.js:47–59  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

45}
46
47async function request(options) {
48 const res = await axios.request({
49 timeout: 20000,
50 validateStatus: () => true,
51 ...options,
52 headers: {
53 "User-Agent": USER_AGENT,
54 Accept: "application/json, text/plain, */*",
55 ...(options.headers || {}),
56 },
57 });
58 return { status: res.status, headers: res.headers || {}, data: res.data };
59}
60
61async function getWxCode(appid, openid) {
62 if (!WX_AUTH) throw new Error("未配置 wx_auth");

Callers 4

getWxCodeFunction · 0.70
loginMethod · 0.70
queryMethod · 0.70
signMethod · 0.70

Calls 1

requestMethod · 0.45

Tested by

no test coverage detected