MCPcopy
hub / github.com/alibaba/lowcode-engine / post

Function post

packages/renderer-core/src/utils/request.ts:50–67  ·  view source on GitHub ↗
(dataAPI: any, params = {}, headers: any = {}, otherProps = {})

Source from the content-addressed store, hash-verified

48 * @returns
49 */
50export function post(dataAPI: any, params = {}, headers: any = {}, otherProps = {}) {
51 const processedHeaders = {
52 Accept: 'application/json',
53 'Content-Type': 'application/x-www-form-urlencoded',
54 ...headers,
55 };
56 const body = processedHeaders['Content-Type'].indexOf('application/json') > -1 || Array.isArray(params)
57 ? JSON.stringify(params)
58 : serializeParams(params);
59
60 return request(
61 dataAPI,
62 'POST',
63 body,
64 processedHeaders,
65 otherProps,
66 );
67}
68
69/**
70 * do request

Callers 2

doRequestFunction · 0.90
request.test.tsFile · 0.90

Calls 3

serializeParamsFunction · 0.85
requestFunction · 0.70
indexOfMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…