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

Method miniPost

wxapp/longfor.js:400–413  ·  view source on GitHub ↗
(url, data, member = false)

Source from the content-addressed store, hash-verified

398 }
399
400 async miniPost(url, data, member = false) {
401 const { data: result, status } = await axios.post(url, data, {
402 headers: this.miniHeaders(data, member),
403 timeout: 20000,
404 validateStatus: () => true,
405 });
406 if (status !== 200) throw new Error(`HTTP ${status}: ${JSON.stringify(result)}`);
407 if (!ok(result?.code)) {
408 const err = new Error(result?.msg || result?.message || JSON.stringify(result));
409 err.code = result?.code;
410 throw err;
411 }
412 return result.data;
413 }
414
415 async taskPost(pathname, data, dxToken = "") {
416 const { data: result, status } = await axios.post(`${TASK_HOST}${pathname}`, data, {

Callers 2

loginByWxCodeMethod · 0.95
getPageConfigMethod · 0.95

Calls 3

miniHeadersMethod · 0.95
okFunction · 0.70
postMethod · 0.45

Tested by

no test coverage detected