MCPcopy Create free account
hub / github.com/CapSoftware/Cap / parseJson

Function parseJson

apps/mobile/src/api/mobile.ts:86–94  ·  view source on GitHub ↗
(response: Response)

Source from the content-addressed store, hash-verified

84};
85
86const parseJson = async (response: Response) => {
87 const text = await response.text();
88 if (text.length === 0) return null;
89 try {
90 return JSON.parse(text) as unknown;
91 } catch {
92 return text;
93 }
94};
95
96export const createSessionRequestUrl = (
97 baseUrl: string,

Callers 2

requestFunction · 0.85
publicRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected