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

Method getHeaders

wxapp/parkson.js:125–138  ·  view source on GitHub ↗
(extra = {})

Source from the content-addressed store, hash-verified

123 }
124
125 getHeaders(extra = {}) {
126 const headers = {
127 "User-Agent": USER_AGENT,
128 "Referer": `https://servicewechat.com/${MINI_APP_ID}/42/page-frame.html`,
129 "Accept": "application/json, text/plain, */*",
130 appId: MINI_APP_ID,
131 version: APP_VERSION,
132 envVersion: ENV_VERSION,
133 "xy-extra-data": `appid=${MINI_APP_ID};version=${APP_VERSION};envVersion=${ENV_VERSION};`,
134 ...extra,
135 };
136 if (this.authorization) headers.Authorization = this.authorization;
137 return headers;
138 }
139
140 async request({ method = "POST", apiPath, params = {}, data = {}, skipToken = false }) {
141 const options = {

Callers 1

requestMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected