MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / jsonFetch

Function jsonFetch

packages/cli/src/auth/client.test.ts:6–12  ·  view source on GitHub ↗
(body: unknown, status = 200)

Source from the content-addressed store, hash-verified

4import type { ResolvedCredential } from "./resolver.js";
5
6function jsonFetch(body: unknown, status = 200): typeof fetch {
7 return (async () =>
8 new Response(JSON.stringify(body), {
9 status,
10 headers: { "content-type": "application/json" },
11 })) as unknown as typeof fetch;
12}
13
14function textFetch(body: string, status: number): typeof fetch {
15 return (async () => new Response(body, { status })) as unknown as typeof fetch;

Callers 1

client.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected