diff --git a/resources/js/helpers/api.ts b/resources/js/helpers/api.ts index 1f6a9dc..dcb7e14 100644 --- a/resources/js/helpers/api.ts +++ b/resources/js/helpers/api.ts @@ -15,6 +15,7 @@ interface ApiOptions { method?: string; headers?: HeadersInit; body?: string | object; + signal?: AbortSignal | null; progress?: ApiProgressCallback; } @@ -64,6 +65,7 @@ export const api = { method: options.method || "GET", headers: options.headers, body: options.body, + signal: options.signal || null, }; let receivedData = false;