MCPcopy
hub / github.com/garrytan/gstack / fetchWith

Function fetchWith

ios-qa/daemon/test/daemon-integration.test.ts:72–75  ·  view source on GitHub ↗
(method: string, url: string, init: { headers?: Record<string, string>; body?: string } = {})

Source from the content-addressed store, hash-verified

70}
71
72async function fetchWith(method: string, url: string, init: { headers?: Record<string, string>; body?: string } = {}): Promise<{ status: number; bodyText: string }> {
73 const res = await fetch(url, { method, headers: init.headers, body: init.body });
74 return { status: res.status, bodyText: await res.text() };
75}
76
77describe('daemon — loopback listener', () => {
78 let stub: Awaited<ReturnType<typeof startStubStateServer>>;

Callers 1

Calls 2

fetchFunction · 0.50
textMethod · 0.45

Tested by

no test coverage detected