AngularTS
    Preparing search index...

    Interface RestResponse<T>

    Response shape returned by RestBackend implementations.

    HTTP-backed responses may include the usual HttpResponse metadata, while local or cached backends can return only data plus optional cache source metadata.

    interface RestResponse<T = unknown> {
        config?: RequestConfig;
        data: T;
        headers?: HttpHeadersGetter;
        source?: "network" | "cache";
        stale?: boolean;
        status?: number;
        statusText?: string;
        xhrStatus?: HttpResponseStatus;
    }

    Type Parameters

    • T = unknown

    Hierarchy

    Index

    Properties

    config?: RequestConfig

    Request configuration that produced this response.

    data: T

    Response payload.

    headers?: HttpHeadersGetter

    Lazy response header reader.

    source?: "network" | "cache"

    Backend that produced the response.

    stale?: boolean

    Whether the returned cached value may be older than the remote source.

    status?: number

    Numeric HTTP status code. Non-2xx statuses reject the promise.

    statusText?: string

    Native status text such as OK or Not Found.

    xhrStatus?: HttpResponseStatus

    Transport completion status. Useful for distinguishing timeout, abort, and network errors.