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

Method getHeaders

wxapp/nissin.js:127–136  ·  view source on GitHub ↗
(extra = {})

Source from the content-addressed store, hash-verified

125 }
126
127 getHeaders(extra = {}) {
128 const headers = {
129 "User-Agent": USER_AGENT,
130 "Referer": `https://servicewechat.com/${MINI_APP_ID}/${PAGE_VERSION}/page-frame.html`,
131 "Accept": "application/json, text/plain, */*",
132 ...extra,
133 };
134 if (this.token) headers.Authorization = `Bearer ${this.token}`;
135 return headers;
136 }
137
138 async request({ method = "GET", apiPath, data, params, skipToken = false }) {
139 const options = {

Callers 1

requestMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected