MCPcopy Create free account
hub / github.com/cli/cli / request

Function request

evals/src/harness.test.ts:388–391  ·  view source on GitHub ↗
(input, init)

Source from the content-addressed store, hash-verified

386 const repo = "sandbox/run-00000000-0000-4000-8000-000000000001";
387 const requests: string[] = [];
388 const request: typeof fetch = async (input, init) => {
389 requests.push(`${init?.method} ${new URL(String(input)).pathname} ${new Headers(init?.headers).get("authorization")}`);
390 return init?.method === "GET" ? Response.json({ id: 1, private: true }) : new Response(null, { status: 204 });
391 };
392 const suite: Suite = { name: "plain", scenarios: ["one"], variants: ["eval"], start: () => { throw new Error("unused"); } };
393 const journal: Journal = { version: 2, suite: "plain", repo, id: 1, cleaned: false, resources: {} };
394 await cleanupSuite(suite, journal, join(root, "resources.json"), { token: "agent", fixtureToken: "fixture", request });

Callers

nothing calls this directly

Calls 2

pushMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected