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

Function request

wxapp/jsbhuiyuan.js:42–54  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

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

Callers 2

getWxCodeFunction · 0.70
apiMethod · 0.70

Calls 1

requestMethod · 0.45

Tested by

no test coverage detected