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

Function request

wxapp/nestle.js:90–102  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

88}
89
90async function request(options) {
91 const res = await axios.request({
92 timeout: 20000,
93 validateStatus: () => true,
94 ...options,
95 headers: {
96 "User-Agent": USER_AGENT,
97 Accept: "application/json, text/plain, */*",
98 ...(options.headers || {}),
99 },
100 });
101 return { status: res.status, headers: res.headers || {}, data: res.data };
102}
103
104async function getWxCode(openid) {
105 if (!WX_AUTH) throw new Error("未配置 wx_auth,无法从 wx_server 获取 code");

Callers 3

getWxCodeFunction · 0.70
loginMethod · 0.70
apiMethod · 0.70

Calls 1

requestMethod · 0.45

Tested by

no test coverage detected