kinetex - v1.0.0-rc.1
    Preparing search index...

    Function xhrFetch

    • Fetch implementation using XMLHttpRequest for browsers that don't support fetch with upload progress.

      When to use xhrFetch vs withUploadProgress:

      Scenario Use
      Modern browsers (Chrome 72+, Firefox 70+, Safari 15+) withUploadProgress
      Need upload progress in older browsers xhrFetch
      Uploading to servers that require XHR semantics xhrFetch
      Already using fetch-based code withUploadProgress

      Note: xhrFetch uses XMLHttpRequest which is browser-only and will throw in Node.js, Deno, Bun, or other non-browser runtimes.

      Parameters

      • url: string
      • options: {
            method?: string;
            headers?: Record<string, string>;
            body?: string | ArrayBuffer | FormData | Blob | URLSearchParams | null;
            responseType?: XMLHttpRequestResponseType;
        } & XHRProgressOptions

      Returns Promise<XHRResult>