HttpRequest interface

Represents an HTTP request.

Properties

abortSignal

An AbortSignal that can be monitored for cancellation.

content

The body content for the request. May be a string or an ArrayBuffer (for binary data).

headers

An object describing headers to apply to the request.

method

The HTTP method to use for the request.

responseType

The XMLHttpRequestResponseType to apply to the request.

timeout

The time to wait for the request to complete before throwing a TimeoutError. Measured in milliseconds.

url

The URL for the request.

Property Details

abortSignal

An AbortSignal that can be monitored for cancellation.

abortSignal?: AbortSignal

Property Value

content

The body content for the request. May be a string or an ArrayBuffer (for binary data).

content?: string | ArrayBuffer

Property Value

string | ArrayBuffer

headers

An object describing headers to apply to the request.

headers?: function

Property Value

method

The HTTP method to use for the request.

method?: string

Property Value

responseType

The XMLHttpRequestResponseType to apply to the request.

responseType?: XMLHttpRequestResponseType

Property Value

XMLHttpRequestResponseType

timeout

The time to wait for the request to complete before throwing a TimeoutError. Measured in milliseconds.

timeout?: number

Property Value

url

The URL for the request.

url?: string

Property Value