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

Function request

wxapp/huazhu.js:67–79  ·  view source on GitHub ↗
(options)

Source from the content-addressed store, hash-verified

65}
66
67async function request(options) {
68 const res = await axios.request({
69 timeout: 25000,
70 validateStatus: () => true,
71 ...options,
72 headers: {
73 "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 MicroMessenger MiniProgramEnv/Windows",
74 Accept: "application/json, text/plain, */*",
75 ...(options.headers || {}),
76 },
77 });
78 return { status: res.status, data: res.data, headers: res.headers || {} };
79}
80
81async function getWxCode(openid) {
82 if (!WX_AUTH) throw new Error("未配置 wx_auth,无法从 wx_server 获取 code");

Callers 5

getWxCodeFunction · 0.70
loginMethod · 0.70
queryMemberMethod · 0.70
querySignHeaderMethod · 0.70
signMethod · 0.70

Calls 1

requestMethod · 0.45

Tested by

no test coverage detected