Minimal response type compatible with both native fetch and Forge API responses.

interface AnyResponse {
    headers: {
        forEach(callbackfn: ((value: string, key: string) => void)): void;
        get(key: string): null | string;
        has(key: string): boolean;
    };
    ok: boolean;
    status: number;
    statusText: string;
    arrayBuffer(): Promise<ArrayBuffer>;
    text(): Promise<string>;
}

Properties

headers: {
    forEach(callbackfn: ((value: string, key: string) => void)): void;
    get(key: string): null | string;
    has(key: string): boolean;
}
ok: boolean
status: number
statusText: string

Methods

  • Returns Promise<ArrayBuffer>

  • Returns Promise<string>