( url: string, init?: RequestInit, timeoutMs = REQUEST_TIMEOUT_MS, )
| 367 | } |
| 368 | |
| 369 | async function fetchWithTimeout( |
| 370 | url: string, |
| 371 | init?: RequestInit, |
| 372 | timeoutMs = REQUEST_TIMEOUT_MS, |
| 373 | ): Promise<Response> { |
| 374 | return fetch(url, { ...init, signal: init?.signal ?? timeoutSignal(timeoutMs) }); |
| 375 | } |
| 376 | |
| 377 | async function postJson( |
| 378 | proxy: ProxyHandle, |
no test coverage detected