Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ExpressResponseAdapter<Payload>

Adapter for express response instance.

Type parameters

  • Payload

    Type of the response payload.

Hierarchy

  • ExpressResponseAdapter

Implements

  • HttpResponse<Payload>

Constructors

Accessors

Methods

Constructors

constructor

  • new ExpressResponseAdapter<Payload>(res: Response<any, Record<string, any>>): ExpressResponseAdapter<Payload>
  • Type parameters

    • Payload

    Parameters

    • res: Response<any, Record<string, any>>

    Returns ExpressResponseAdapter<Payload>

Accessors

raw

  • get raw(): Response<any, Record<string, any>>
  • Get raw express response instance.

    Returns Response<any, Record<string, any>>

sent

  • get sent(): boolean
  • inheritdoc

    Returns boolean

Methods

header

  • inheritdoc

    Parameters

    • field: string
    • value: HttpHeaderValue

    Returns ExpressResponseAdapter<Payload>

send

  • send(payload?: Payload): void
  • inheritdoc

    Parameters

    • Optional payload: Payload

    Returns void

status

  • inheritdoc

    Parameters

    • statusCode: HttpStatusCode

    Returns ExpressResponseAdapter<Payload>

type

  • inheritdoc

    Parameters

    • mimeType: string

    Returns ExpressResponseAdapter<Payload>