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]
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]