Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface Request

Represents an incoming request.

Hierarchy

  • Request

Index

Properties

Optional body

body: undefined | string

The request body as a string

getHeader

getHeader: (name: string) => string

Gets the value of a header

param

The name of the header to return

returns

The value of the header

Type declaration

    • (name: string): string
    • Parameters

      • name: string

      Returns string

getHeaders

getHeaders: () => {}

Gets all headers as key/value pairs.

Type declaration

    • (): {}
    • Returns {}

      • [name: string]: string

headers

headers: {}

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.

Type declaration

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

method

method: string

The HTTP method

Optional params

params: undefined | {}

The path params returned by the matching route.

path

path: string

Just the path part of the URL

Optional query

query: undefined | {}

The params extracted from the request URL's query string

Optional rawBody

rawBody: Buffer

The raw request body as a buffer

removeHeader

removeHeader: (name: string) => void

Removes a header

param

The header to remove

Type declaration

    • (name: string): void
    • Parameters

      • name: string

      Returns void

secure

secure: boolean

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

setHeader

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

Sets a header

param

The name of the header to set

param

The value to set

Type declaration

    • (name: string, value: string): void
    • Parameters

      • name: string
      • value: string

      Returns void

url

url: string

The path and query string

Generated using TypeDoc