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

Method getHeaders

wxapp/campari.js:122–130  ·  view source on GitHub ↗
(token = this.session.token)

Source from the content-addressed store, hash-verified

120 }
121
122 getHeaders(token = this.session.token) {
123 const headers = {
124 "Content-Type": "application/json",
125 "User-Agent": USER_AGENT,
126 "Referer": `https://servicewechat.com/${MINI_APP_ID}/${PAGE_VERSION}/page-frame.html`,
127 };
128 if (token) headers.Authorization = `Bearer ${token}`;
129 return headers;
130 }
131
132 async request(apiPath, data = {}, token = this.session.token) {
133 const res = await axios.post(`${API_BASE}${apiPath}`, data || {}, {

Callers 1

requestMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected