(endpoint: string, init?: RequestInit)
| 1 | const STACK_API_ORIGIN = "https://127.1:57404"; |
| 2 | |
| 3 | const fetcher = async (endpoint: string, init?: RequestInit) => { |
| 4 | const response = await fetch(`${STACK_API_ORIGIN}${endpoint}`, init); |
| 5 | if (!response.ok) { |
| 6 | throw new Error(response.statusText); |
| 7 | } |
| 8 | return response.text(); |
| 9 | }; |
| 10 | |
| 11 | export const isApiAccessible = async () => { |
| 12 | try { |
no outgoing calls
no test coverage detected