UNPKG

hook-fetch

Version:

A lightweight and modern HTTP request library developed based on the native Fetch API of the browser, providing a user-friendly interface similar to Axios and powerful extensibility.

20 lines (19 loc) 674 B
import { RequestConfig } from './types'; export interface ResponseErrorOptions<E = unknown> { name?: string; message: string; status?: number; statusText?: string; response?: Response; config?: RequestConfig<unknown, unknown, E>; } export declare class ResponseError<E = unknown> extends Error { #private; constructor({ message, status, statusText, response, config, name }: ResponseErrorOptions<E>); get message(): string; get status(): number | undefined; get statusText(): string | undefined; get response(): Response | undefined; get config(): RequestConfig<unknown, unknown, E> | undefined; get name(): string; }