Interface FetcherResponseInfo

Response object from an API call made by a Fetcher.

interface FetcherResponseInfo {
    additionalAttributes?: Record<string, any>;
    body?: string;
    headers: Record<string, string>;
    httpVersion: 1 | 2;
    status: number;
    statusText: string;
    url: string;
}

Properties

additionalAttributes?: Record<string, any>

Any additional attributes that may be included in the response (for use w/ custom Fetcher implementations).

This is mainly for any potential logging or debugging information that may be useful for the user.

body?: string

The string body of the response, if it exists.

headers: Record<string, string>

The headers of the response.

httpVersion: 1 | 2

The HTTP version used for the request.

status: number

The HTTP status code of the response.

statusText: string

The status text for the response.

url: string

The URL that the request was made to.