MCPcopy Create free account
hub / github.com/Mnexa-AI/e2a / post

Function post

mcp/tests/http.test.ts:516–528  ·  view source on GitHub ↗
(id: number)

Source from the content-addressed store, hash-verified

514 close = c;
515 const local = `http://127.0.0.1:${port}/mcp`;
516 const post = async (id: number) => {
517 const res = await fetch(local, {
518 method: "POST",
519 headers: {
520 "Content-Type": "application/json",
521 Accept: "application/json, text/event-stream",
522 Authorization: "Bearer idle_token",
523 },
524 body: JSON.stringify({ jsonrpc: "2.0", id, method: "tools/list" }),
525 });
526 const text = await res.text();
527 return { status: res.status, text };
528 };
529
530 const first = await post(1);
531 expect(first.status).toBe(200);

Callers 2

http.test.tsFile · 0.70

Calls 3

fetchFunction · 0.85
stringifyMethod · 0.80
textMethod · 0.65

Tested by

no test coverage detected