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

Function fetchJson

test/skill-e2e-ios.test.ts:158–164  ·  view source on GitHub ↗
(method: string, url: string, init: { headers?: Record<string, string>; body?: string } = {})

Source from the content-addressed store, hash-verified

156}
157
158async function fetchJson(method: string, url: string, init: { headers?: Record<string, string>; body?: string } = {}): Promise<{ status: number; body: unknown }> {
159 const res = await fetch(url, { method, headers: init.headers, body: init.body });
160 const text = await res.text();
161 let body: unknown;
162 try { body = JSON.parse(text); } catch { body = text; }
163 return { status: res.status, body };
164}
165
166describe('ios-qa E2E (no-device path)', () => {
167 test('NO_DEVICE: codegen runs against a SwiftUI fixture and emits valid accessors', () => {

Callers 1

Calls 2

fetchFunction · 0.70
textMethod · 0.45

Tested by

no test coverage detected