Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    Function fetchWithTimeout

    • A wrapper method around fetch that attaches an AbortController signal to the fetch call for clean timeouts

      Parameters

      • url: string

        The URL to make the Request to

      • data: RequestInit = {}

        The data of the Request

      • Optionaloptions: { onTimeout?: Function; timeoutMs?: number | null } = {}

        Additional options

        • OptionalonTimeout?: Function

          A method to invoke if and when the timeout is reached

        • OptionaltimeoutMs?: number | null

          How long to wait for a Response before cleanly aborting. If null, no timeout is applied. Default: 30000.

      Returns Promise<Response>