Skip to main content
Version: Next

HttpRequest

One prepared request attempt, as HttpClient.sendRequest receives it from the shared pipeline.

Index

Properties

optionalbody

Request body, already serialized and compressed, or undefined for a request without one.

headers

headers: Record<string, string>

Final request headers, with the client's default headers already merged in.

method

method: HttpMethod

HTTP method.

optionalsignal

signal?: AbortSignal

The caller's abort signal, to hand to the HTTP library alongside the timeout. The pipeline stops retrying once it aborts, so the transport only has to end the request in flight.

stream

stream: boolean

Whether to hand the body back unread as a Readable, so the caller can stream it.

optionaltimeoutMillis

timeoutMillis?: number

Timeout for this attempt in milliseconds, or undefined for a request that runs without one, which is what timeoutSecs: 'noTimeout' asks for.

url

url: string

Full request URL with the query string already encoded into it.