A handier wrapper around a request

interface IFetchedRequest {
    body: Buffer;
    connection: Readonly<Connection>;
    connectionsStack: readonly Readonly<Connection>[];
    headers: IncomingHttpHeaders;
    hostname: string;
    method: string;
    original: IncomingMessage | Http2ServerRequest;
    pathname: string;
    port: string;
    protocol: string;
    queryParameters: Readonly<Record<string, string>>;
    url: URL;
}

Properties

body: Buffer

The body content

connection: Readonly<Connection>

The last connection in connectionsStack

connectionsStack: readonly Readonly<Connection>[]

The connections stack

headers: IncomingHttpHeaders

The headers

hostname: string

The hostname part of the URL

method: string

The HTTP method

original: IncomingMessage | Http2ServerRequest

The original Node.js object representing the request

pathname: string

The path part of the URL

port: string

The port part of the URL

protocol: string

The protocol part of the URL, without the trailing :

queryParameters: Readonly<Record<string, string>>

The query parameters taken from the URL, as a read-only map of strings

url: URL

The URL

Generated using TypeDoc