Aller au contenu principal

cloneResponseMonitorProgress

Callable

  • cloneResponseMonitorProgress(response: Response, onProgress: (event: CustomEvent<DownloadProgress>) => void): Response

  • Clones a fetch Response object and returns a version that calls the onProgress callback as the #progress changes.


    Parameters

    • response: Response

      The fetch Response object to clone.

    • onProgress: (event: CustomEvent<DownloadProgress>) => void

      The callback to call when the download #progress changes.

    Returns Response

    The cloned response