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

Function postJson

e2e/cloud/mcp-sse-replay.test.ts:49–54  ·  view source on GitHub ↗
(mcpUrl: string, bearer: string, body: unknown, sessionId?: string)

Source from the content-addressed store, hash-verified

47});
48
49const postJson = (mcpUrl: string, bearer: string, body: unknown, sessionId?: string) =>
50 fetch(mcpUrl, {
51 method: "POST",
52 headers: mcpHeaders(bearer, sessionId),
53 body: JSON.stringify(body),
54 });
55
56const openSession = async (mcpUrl: string, bearer: string): Promise<string> => {
57 const initialized = await postJson(mcpUrl, bearer, initializeBody);

Callers 1

openSessionFunction · 0.70

Calls 2

mcpHeadersFunction · 0.70
fetchFunction · 0.50

Tested by

no test coverage detected