MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / headers

Function headers

wxapp/junpinhui.js:85–95  ·  view source on GitHub ↗
(token = "")

Source from the content-addressed store, hash-verified

83}
84
85function headers(token = "") {
86 return {
87 "Content-Type": "application/json",
88 "User-Agent": "Mozilla/5.0 MicroMessenger MiniProgramEnv/Windows",
89 Referer: `https://servicewechat.com/${MINI_APP_ID}/215/page-frame.html`,
90 AppID: MINI_APP_ID,
91 "App-Version": APP_VERSION,
92 Authorization: `Basic ${Buffer.from("wechat:wechat_secret").toString("base64")}`,
93 ...(token ? { "X-Access-Token": token } : {}),
94 };
95}
96
97function shortJson(value, limit = 180) {
98 const text = typeof value === "string" ? value : JSON.stringify(value);

Callers 1

requestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected