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

Function makeSign

wxapp/airui.js:88–94  ·  view source on GitHub ↗
(urlPath, method, params, timestamp, token = "")

Source from the content-addressed store, hash-verified

86}
87
88function makeSign(urlPath, method, params, timestamp, token = "") {
89 let payload = "";
90 if (params) {
91 payload = method === "POST" ? JSON.stringify(params) : stringifyQuery(params);
92 }
93 return md5(`${API_BASE}${urlPath}${timestamp}${payload}${APP_KEY}${token || ""}`);
94}
95
96async function apiRequest(method, urlPath, { token = "", params = null } = {}) {
97 const timestamp = String(Date.now());

Callers 1

apiRequestFunction · 0.70

Calls 2

stringifyQueryFunction · 0.85
md5Function · 0.70

Tested by

no test coverage detected