@kognifai/cogsengine
    Preparing search index...

    Type Alias FetchHandler

    FetchHandler: (
        url: string,
        offset: number,
        size: number,
        onload: (response: ArrayBuffer) => void,
        onerror: (msg?: string) => void,
    ) => void

    For Backwards compatibility only. Use new Interface for more flexibility

    Type declaration

      • (
            url: string,
            offset: number,
            size: number,
            onload: (response: ArrayBuffer) => void,
            onerror: (msg?: string) => void,
        ): void
      • Parameters

        • url: string

          Url to load

        • offset: number

          Nonzero offset implies a ranged request. Must also specify size.

        • size: number

          A size > 0 implies a ranged request.

        • onload: (response: ArrayBuffer) => void

          Callback for successful fetch.

        • onerror: (msg?: string) => void

          Callback for fetch failure.

        Returns void

    IFetchHandler

    Custom fetch handler This provides a hook for the client application to intercept requests for resources if they have to be fetched in a way different than a simple HTTP get request.

    If size = 0, a regular fetch of as much as possible is requested. In this case, offset != 0 should not happen and is an error. If size > 0, a fetch of a specific range is requested.