MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / postJson

Function postJson

e2e/cloud/mcp-oversize-response.test.ts:35–40  ·  view source on GitHub ↗
(mcpUrl: string, bearer: string, body: unknown, sessionId?: string)

Source from the content-addressed store, hash-verified

33});
34
35const postJson = (mcpUrl: string, bearer: string, body: unknown, sessionId?: string) =>
36 fetch(mcpUrl, {
37 method: "POST",
38 headers: mcpHeaders(bearer, sessionId),
39 body: JSON.stringify(body),
40 });
41
42const openSession = async (mcpUrl: string, bearer: string): Promise<string> => {
43 const initialized = await postJson(mcpUrl, bearer, {

Callers 2

openSessionFunction · 0.70

Calls 2

mcpHeadersFunction · 0.70
fetchFunction · 0.50

Tested by

no test coverage detected