Represents an HTTP response.

interface HttpResponse {
    body?: string;
    headers: Record<string, string>;
    request: HttpRequest;
    status: number;
    url: string;
}

Properties

body?: string

The HttpRequestBody of the response.

headers: Record<string, string>

The HTTP Headers of the response. Entries are expected to have the HTTP header as the key and its string content as the value.

request: HttpRequest

The corresponding request object of the response.

status: number

The HTTP status code of the response.

url: string

The URL of the response. May differ from HttpRequest.url when redirects have happened.