Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface HttpRequest<Body>

HTTP Request abstraction.

Type parameters

  • Body

    Type of the body.

Hierarchy

  • HttpRequest

Properties

Methods

Properties

Readonly body

body: Body

Request body.

Optional Readonly device

device: null | HttpDevice

Device from where request has been made.

Readonly ip

ip: string

The remote address or the upstream address (when behind web proxy).

Optional Readonly location

location: null | HTTPRequestLocation

Location from where request has been made.

Methods

cookie

  • cookie(name: string): undefined | string
  • Return cookie value.

    Parameters

    • name: string

      Name of the cookie.

    Returns undefined | string

header

  • Return request header.

    Parameters

    • name: string

      Name of the header.

    Returns undefined | HttpHeaderValue

param

  • param(name: string): undefined | string
  • Return path param.

    Parameters

    • name: string

      Name of the param.

    Returns undefined | string

query

  • query(name: string): undefined | string
  • Return query param.

    Parameters

    • name: string

      Name of the param.

    Returns undefined | string