MCPcopy Create free account
hub / github.com/alibaba/lowcode-engine / post

Function post

packages/editor-core/src/utils/request.ts:34–49  ·  view source on GitHub ↗
(dataAPI: string, params?: object, headers?: object, otherProps?: object)

Source from the content-addressed store, hash-verified

32}
33
34export function post(dataAPI: string, params?: object, headers?: object, otherProps?: object): Promise<any> {
35 const fetchHeaders = {
36 Accept: 'application/json',
37 'Content-Type': 'application/x-www-form-urlencoded',
38 ...headers,
39 };
40 return request(
41 dataAPI,
42 'POST',
43 fetchHeaders['Content-Type'].indexOf('application/json') > -1 || Array.isArray(params)
44 ? JSON.stringify(params)
45 : serialize(params),
46 fetchHeaders,
47 otherProps,
48 );
49}
50
51export function request(
52 dataAPI: string,

Callers

nothing calls this directly

Calls 3

requestFunction · 0.70
serializeFunction · 0.70
indexOfMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…