MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / getJson

Function getJson

__tests__/ui-server-api.test.ts:80–84  ·  view source on GitHub ↗

* Payloads are read as `any` on purpose: these tests assert the JSON contract * the viewer sees over the wire, so typing them against the server's own * interfaces would only prove the server agrees with itself.

(requestPath: string)

Source from the content-addressed store, hash-verified

78 * interfaces would only prove the server agrees with itself.
79 */
80async function getJson(requestPath: string): Promise<any> {
81 const res = await request(requestPath);
82 expect(res.headers['content-type']).toBe('application/json; charset=utf-8');
83 return JSON.parse(res.body);
84}
85
86async function getStatusAndJson(requestPath: string): Promise<{ status: number; body: any }> {
87 const res = await request(requestPath);

Callers 2

idOfFunction · 0.70

Calls 2

parseMethod · 0.80
requestFunction · 0.70

Tested by

no test coverage detected