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>;
}
| Name | Signature | Description |
|---|---|---|
ok | readonly ok: boolean; | |
status | readonly status: number; | |
statusTextoptional | readonly statusText?: string; | |
headersoptional | readonly headers?: {
get(name: string): string | null;
}; | |
json | json(): Promise<unknown>; | |
text | text(): Promise<string>; |