Repository URL to install this package:
|
Version:
0.0.7 ▾
|
export declare function fromFetchAndResponseToObj<Body = any>(response: Response, body: Body): {
type: ResponseType;
headers: Headers;
ok: boolean;
status: number;
statusText: string;
data: Body;
};
export declare function fetchJson<Body = {
[key: string]: any;
}>(url: string | Request, options?: RequestInit): Promise<{
type: ResponseType;
headers: Headers;
ok: boolean;
status: number;
statusText: string;
data: Body;
} | {
error: any;
}>;
export declare function fetchText<BodyType extends string = string>(url: string | Request, options?: RequestInit): Promise<{
type: ResponseType;
headers: Headers;
ok: boolean;
status: number;
statusText: string;
data: BodyType;
} | {
error: any;
}>;
export declare function fetchDynamic<BodyType extends string = string>(url: string | Request, options?: RequestInit): Promise<{
type: ResponseType;
headers: Headers;
ok: boolean;
status: number;
statusText: string;
data: BodyType;
} | {
error: any;
}>;