Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "check"

Index

Type aliases

Functions

Type aliases

Check

Check: function

The check function is invoked on a response as part of the fetcher call. It should throw and error when the the response is invalid. This can provide an easy way to move the promise into the error branch of the promise. The response.clone() call can be used if the data within the response needs to be pulled to determine if the response is in an error state. The default check function throws a FetchError when status is not in the range [200, 299]

Type declaration

    • (response: IResponseImmutable): void
    • Parameters

      • response: IResponseImmutable

      Returns void

Functions

check

  • check(response: IResponseImmutable): void
  • The default reponse checker.

    throws

    {FetchError} when status is not in the range [200, 299]

    Parameters

    • response: IResponseImmutable

    Returns void

get

nothing

  • nothing(): void

set

  • Sets the default fetcher checker

    Parameters

    • callback: Check

      the function that will be invoked when fetcher calls are performed without a local check override

    Returns Check

    the previously set value