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

Function openGet

e2e/cloud/mcp-sse-replay.test.ts:169–183  ·  view source on GitHub ↗
(mcpUrl: string, bearer: string, sessionId: string)

Source from the content-addressed store, hash-verified

167}
168
169const openGet = async (mcpUrl: string, bearer: string, sessionId: string): Promise<SseCapture> => {
170 const abortController = new AbortController();
171 const response = await fetch(mcpUrl, {
172 method: "GET",
173 headers: {
174 accept: "text/event-stream",
175 authorization: `Bearer ${bearer}`,
176 "mcp-protocol-version": PROTOCOL_VERSION,
177 "mcp-session-id": sessionId,
178 },
179 signal: abortController.signal,
180 });
181 expect(response.status, "GET SSE opens").toBe(200);
182 return new SseCapture(response, abortController);
183};
184
185const startPostCapture = async (
186 mcpUrl: string,

Callers 1

Calls 1

fetchFunction · 0.50

Tested by

no test coverage detected