MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / getJson

Function getJson

ui/src/api/simulator.ts:64–68  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

62}
63
64async function getJson<T>(url: string): Promise<T> {
65 const res = await fetch(url)
66 if (!res.ok) throw new Error(`HTTP ${res.status}`)
67 return res.json()
68}
69
70export const simulatorApi = {
71 listUtas: () => getJson<{ utas: SimulatorUTAEntry[] }>('/api/simulator/utas'),

Callers 1

simulator.tsFile · 0.70

Calls 1

fetchFunction · 0.50

Tested by

no test coverage detected