MCPcopy Index your code
hub / github.com/smallfawn/QLScriptPublic / headers

Method headers

wxapp/ctrip.js:317–339  ·  view source on GitHub ↗
(raw)

Source from the content-addressed store, hash-verified

315 }
316
317 headers(raw) {
318 const headers = {
319 "Content-Type": "application/json",
320 Accept: "*/*",
321 "x-ctx-locale": "zh-CN",
322 "x-ctx-group": "ctrip",
323 "x-ctx-region": "CN",
324 "x-ctx-currency": "CNY",
325 "x-wx-include-credentials": "env",
326 "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 MicroMessenger/3.9.12 MiniProgramEnv/Windows WindowsWechat/WMPF",
327 Referer: `https://servicewechat.com/${MINI_APP_ID}/${PACKAGE_VERSION}/page-frame.html`,
328 };
329 if (this.openid) headers["x-wx-openid"] = this.openid;
330 if (this.duid) headers.duid = this.duid;
331 if (this.udl) headers.udl = this.udl;
332 const cookies = [];
333 if (this.duid) cookies.push(`DUID=${encodeURIComponent(this.duid)}`);
334 if (this.udl) cookies.push(`_udl=${this.udl}`);
335 cookies.push(`GUID=${CLIENT_ID}`);
336 headers.Cookie = `${cookies.join("; ")};`;
337 if (csign?.cSign) headers["n-payload-source"] = csign.cSign(md5(raw));
338 return headers;
339 }
340
341 dataHead(extra = {}) {
342 return {

Callers 1

ctripRequestMethod · 0.95

Calls 1

md5Function · 0.70

Tested by

no test coverage detected