(resp: Response)
| 71 | } |
| 72 | |
| 73 | function handle401(resp: Response): void { |
| 74 | if (resp.status === 401 && _on401) _on401() |
| 75 | } |
| 76 | |
| 77 | export async function get<T>(path: string, signal?: AbortSignal): Promise<T> { |
| 78 | const resp = await fetch(`${_baseUrl}${path}`, { |