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

Method getHeaders

wxapp/roki.js:163–181  ·  view source on GitHub ↗
(extra = {})

Source from the content-addressed store, hash-verified

161 }
162
163 getHeaders(extra = {}) {
164 const timestamp = Date.now();
165 const headers = {
166 "User-Agent": USER_AGENT,
167 "Referer": `https://servicewechat.com/${MINI_APP_ID}/454/page-frame.html`,
168 "Accept": "application/json, text/plain, */*",
169 "Content-type": "application/json",
170 "X-App-Env": APP_ENV,
171 "X-USER-TOKEN": this.token || "",
172 "app-id": ROKI_APP_ID,
173 timestamp,
174 nonce: AES_SECRET,
175 secret: AES_SECRET,
176 signature: signRequest(timestamp),
177 "app-version": APP_VERSION,
178 ...extra,
179 };
180 return headers;
181 }
182
183 async request({ method = "GET", apiPath, params = {}, data = {}, skipToken = false }) {
184 const upperMethod = method.toUpperCase();

Callers 1

requestMethod · 0.95

Calls 1

signRequestFunction · 0.85

Tested by

no test coverage detected