interface HttpRequestHandler {
    afterFetchResponseAsync: (
        url: string,
        response: Response,
        request: RequestInit,
    ) => Promise<boolean>;
    beforeFetchRequestAsync: (
        url: string,
        request: RequestInit,
    ) => Promise<LfApiClientCore.BeforeFetchResult>;
}

Implemented by

Properties

afterFetchResponseAsync: (
    url: string,
    response: Response,
    request: RequestInit,
) => Promise<boolean>

Called to handle the response from the API service.

Type declaration

    • (url: string, response: Response, request: RequestInit): Promise<boolean>
    • Parameters

      • url: string

        The HTTP url

      • response: Response

        The HTTP response

      • request: RequestInit

        The HTTP request

      Returns Promise<boolean>

      true if the request should be retried.

beforeFetchRequestAsync: (
    url: string,
    request: RequestInit,
) => Promise<LfApiClientCore.BeforeFetchResult>

Called to prepare the request to the API service.

Type declaration