Represents an incoming request.

Hierarchy

  • default

Implemented by

Properties

body?: string

The request body as a string

cloneOriginal: (() => default)

Type declaration

    • (): default
    • Returns a clone of the original request, before any properties were altered

      Returns

      Returns default

getHeader: ((name: string) => unknown)

Type declaration

    • (name: string): unknown
    • Gets the value of a header

      Returns

      The value of the header

      Parameters

      • name: string

        The name of the header to return - case insensitive

      Returns unknown

getHeaders: (() => RequestHeaders)

Type declaration

The request headers. Keys are header names, values are either a string, or when multiple values for the same header name are present, an array of strings.

httpVersion: string

The http version (e.g. )

method: string

The HTTP method

params?: {
    [key: string]: string | string[];
}

The path params returned by the matching route.

Type declaration

  • [key: string]: string | string[]
path: string

Just the path part of the URL

port: string

Port on which request came.

protocol: string

The protocol (e.g. http or hhtps)

query: {
    [key: string]: string | string[] | undefined;
}

The params extracted from the request URL's query string

Type declaration

  • [key: string]: string | string[] | undefined
rawBody?: Buffer

The raw request body as a buffer

rawHeaders: string[]

Raw headers, supported by both converting from lambda request and express request

removeHeader: ((name: string) => void)

Type declaration

    • (name: string): void
    • Removes a header

      Parameters

      • name: string

        The header to remove

      Returns void

secure: boolean

Flag indicating if the connection to Edgio is secure (HTTPS) or not (HTTP).

setHeader: ((name: string, value: unknown) => void)

Type declaration

    • (name: string, value: unknown): void
    • Sets a header

      Parameters

      • name: string

        The name of the header to set

      • value: unknown

        The value to set

      Returns void

socket: {
    remoteAddress: string;
}

Type declaration

  • remoteAddress: string

    The IP address of the client

url: string

The path and query string

Generated using TypeDoc