Class FetchQueue

A queue to manage fetch requests with unique identification.

Constructors

Methods

Constructors

  • Parameters

    • fetchFn: ((url: string, options?: RequestInit) => Promise<any>)

      A fetch function (e.g., node-fetch or window.fetch).

        • (url, options?): Promise<any>
        • Parameters

          • url: string
          • Optionaloptions: RequestInit

          Returns Promise<any>

    Returns FetchQueue

Methods

  • Adds a fetch request to the queue.

    Parameters

    • url: string

      The URL to fetch.

    • Optionaloptions: RequestInit

      Optional fetch options.

    Returns Promise<any>

    • A promise that resolves with the fetch response.