Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ExpressRequestAdapter<Body>

Adapter for express request instance.

Type parameters

  • Body

    Type of the body.

Hierarchy

  • ExpressRequestAdapter

Implements

  • HttpRequest<Body>

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

Static deviceDetector

deviceDetector: HttpDeviceDetector<AdaptedExpressRequest<ParamsDictionary, any, any, ParsedQs, Record<string, any>>> = ...

Device detector.
You can assign your own HttpDeviceDetector implementation.
Defaults to ExpressDeviceDetector which detects device based on User-Agent header.

Accessors

body

  • get body(): Body
  • inheritdoc

    Returns Body

device

  • get device(): undefined | null | HttpDevice
  • inheritdoc

    Returns undefined | null | HttpDevice

ip

  • get ip(): string
  • inheritdoc

    Returns string

location

  • get location(): undefined | null | HTTPRequestLocation
  • inheritdoc

    Returns undefined | null | HTTPRequestLocation

raw

  • Get raw express request instance.

    Returns AdaptedExpressRequest<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

Methods

cookie

  • cookie(name: string): undefined | string
  • inheritdoc

    Parameters

    • name: string

    Returns undefined | string

header

  • header(name: string): undefined | HttpHeaderValue
  • inheritdoc

    Parameters

    • name: string

    Returns undefined | HttpHeaderValue

param

  • param(name: string): undefined | string
  • inheritdoc

    Parameters

    • name: string

    Returns undefined | string

query

  • query(name: string): undefined | string
  • inheritdoc

    Parameters

    • name: string

    Returns undefined | string