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

Method headers

wxapp/mengxiangjia.js:122–133  ·  view source on GitHub ↗
(withToken = true)

Source from the content-addressed store, hash-verified

120 }
121
122 headers(withToken = true) {
123 const headers = {
124 "User-Agent": USER_AGENT,
125 "Referer": `https://servicewechat.com/${MINI_APP_ID}/5/page-frame.html`,
126 "Accept": "application/json, text/plain, */*",
127 "appId": MINI_APP_ID,
128 "version": VERSION,
129 "envVersion": "release",
130 };
131 if (withToken && this.accessToken) headers.Authorization = `bearer${this.accessToken}`;
132 return headers;
133 }
134
135 async request({ method = "GET", apiPath, data = {}, params = {}, needToken = true }) {
136 const options = {

Callers 1

requestMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected