MCPcopy Create free account
hub / github.com/Lakr233/AssppWeb / apiGet

Function apiGet

frontend/src/api/client.ts:10–16  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

8}
9
10export async function apiGet<T>(path: string): Promise<T> {
11 const res = await fetch(`${BASE_URL}${path}`, {
12 headers: authHeaders(),
13 });
14 if (!res.ok) throw new Error(await res.text());
15 return res.json();
16}
17
18export async function apiPost<T>(path: string, body?: any): Promise<T> {
19 const res = await fetch(`${BASE_URL}${path}`, {

Callers 6

HomePageFunction · 0.90
SettingsPageFunction · 0.90
fetchDownloadsFunction · 0.90
searchAppsFunction · 0.90
lookupAppFunction · 0.90
client.test.tsFile · 0.90

Calls 4

fetchFunction · 0.85
authHeadersFunction · 0.85
textMethod · 0.80
jsonMethod · 0.80

Tested by

no test coverage detected