UNPKG

react-http-fetch

Version:

An http library for React JS built on top of native JS fetch

26 lines (25 loc) 739 B
import { HttpRequest } from '../client'; import { HttpStatusCode } from '../enum'; export declare class HttpError<HttpResponseT, HttpRequestBodyT> extends Error { /** * The http status code. */ status?: HttpStatusCode; /** * The http statsu text. */ statusText?: string; /** * The stringified response body. */ response?: HttpResponseT; /** * The request info. */ request?: HttpRequest<HttpRequestBodyT>; /** * The initial error that was catched. */ nativeError?: unknown; constructor(message: string, status?: HttpStatusCode, requestInfo?: HttpRequest<HttpRequestBodyT>, statusText?: string, response?: HttpResponseT, nativeError?: unknown); }