Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FastifyRequestAdapter<Body>

Adapter for fastify request instance.

Type parameters

  • Body

    Type of the body.

Hierarchy

  • FastifyRequestAdapter

Implements

  • HttpRequest<Body>

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

Static deviceDetector

deviceDetector: HttpDeviceDetector<AdaptedFastifyRequest<RouteGenericInterface, Server, IncomingMessage>> = ...

Device detector.
You can assign you own HttpDeviceDetector implementation.
Defaults to FastifyDeviceDetector 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 fastify request instance.

    Returns AdaptedFastifyRequest<RouteGenericInterface, Server, IncomingMessage>

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