vapor-chamber API reference - v1.16.0
    Preparing search index...

    Type Alias HttpResponse<T>

    type HttpResponse<T = unknown> = {
        data: T;
        status: number;
        headers: Record<string, string>;
        ok: boolean;
        stale?: boolean;
        revalidation?: Promise<HttpResponse<T>>;
        servedOnError?: boolean;
        error?: unknown;
    }

    Type Parameters

    • T = unknown
    Index
    data: T
    status: number
    headers: Record<string, string>
    ok: boolean
    stale?: boolean

    True when this response was served from a stale (past-fresh) cache entry.

    revalidation?: Promise<HttpResponse<T>>

    Present on a stale hit: resolves with the fresh response once the background revalidation lands.

    servedOnError?: boolean

    True when this is a retained cache entry served in place of a transient failure (cache.serveStaleOnError).

    error?: unknown

    The transient error servedOnError masked — surfaced alongside the stale data, never silently dropped.