Represents an HTTP message with headers and an optional static or streaming body. body: ArrayBuffer | ArrayBufferView | string | Uint8Array | Readable | ReadableStream;

Hierarchy (view full)

Implements

Constructors

Properties

body?: any
fragment?: string
headers: HeaderBag
hostname: string
method: string
password?: string
path: string
port?: number
protocol: string
username?: string

Methods

  • Returns HttpRequest

    Deprecated

    use static HttpRequest.clone(request) instead. It's not safe to call this method because HttpRequest.isInstance incorrectly asserts that IHttpRequest (interface) objects are of type HttpRequest (class).

  • This method only actually asserts that request is the interface IHttpRequest, and not necessarily this concrete class. Left in place for API stability.

    Do not call instance methods on the input of this function, and do not assume it has the HttpRequest prototype.

    Parameters

    • request: unknown

    Returns request is HttpRequest