The response returned from an HTTP request.

interface HttpResponse<R> {
    body: null | R;
    headers: Record<string, string | string[]>;
    status: number;
    statusText: string;
    url: null | string;
}

Type Parameters

  • R

Properties

body: null | R

The response body, or null if a response was not returned.

headers: Record<string, string | string[]>

The response headers.

status: number

The status code of the response.

statusText: string

The status message corresponding to the status code.

url: null | string

The URL of the response.