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

Method getHeaders

wxapp/fsdlb.js:146–166  ·  view source on GitHub ↗
(extra = {}, auth = true)

Source from the content-addressed store, hash-verified

144 }
145
146 getHeaders(extra = {}, auth = true) {
147 const headers = {
148 componentSend: "1",
149 "HH-FROM": MERCHANT_APP_NAME,
150 "HH-APP": MINI_APP_ID,
151 "HH-VERSION": TEMPLATE_VERSION,
152 "X-VERSION": X_VERSION,
153 "Content-Type": "application/json",
154 appPublishType: APP_PUBLISH_TYPE,
155 "HH-CI": CLIENT_ID,
156 "MARKETING-PLAN-NO": "",
157 "USER-ENTRANCE-CHANNEL": "",
158 "USER-ENTRANCE-CHANNEL-KEY": "",
159 "ONE-ID": this.userInfo.oneId || "",
160 groupPosId: "",
161 "User-Agent": USER_AGENT,
162 ...extra,
163 };
164 if (auth && this.token) headers.Authorization = `bearer ${this.token}`;
165 return headers;
166 }
167
168 async request({ method = "GET", path: apiPath, data, params, auth = true }) {
169 const options = {

Callers 1

requestMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected