(
url: string,
options: RequestInit = {}
)
| 47 | * @returns Fetch response |
| 48 | */ |
| 49 | export async function apiFetch( |
| 50 | url: string, |
| 51 | options: RequestInit = {} |
| 52 | ): Promise<Response> { |
| 53 | const { getBackendHeaders } = await import('../services/backendClient'); |
| 54 | const headers = await getBackendHeaders(options.headers); |
| 55 | |
| 56 | return fetch(url, { |
| 57 | ...options, |
| 58 | headers, |
| 59 | }); |
| 60 | } |
no test coverage detected