View as Markdown

API reference: @salmonui/data

FetchResponseLikeinterface

import type { FetchResponseLike } from '@salmonui/data';
interface FetchResponseLike {
    readonly ok: boolean;
    readonly status: number;
    readonly statusText?: string;
    readonly headers?: {
        get(name: string): string | null;
    };
    json(): Promise<unknown>;
    text(): Promise<string>;
}
FetchResponseLike members (6)
NameSignatureDescription
okreadonly ok: boolean;
statusreadonly status: number;
statusTextoptionalreadonly statusText?: string;
headersoptionalreadonly headers?: { get(name: string): string | null; };
jsonjson(): Promise<unknown>;
texttext(): Promise<string>;