Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FastifyResponseAdapter<Payload>

Adapter for fastify reply instance.

Type parameters

  • Payload

    Type of the response payload.

Hierarchy

  • FastifyResponseAdapter

Implements

  • HttpResponse<Payload>

Constructors

Accessors

Methods

Constructors

constructor

  • new FastifyResponseAdapter<Payload>(res: FastifyReply<Server, IncomingMessage, ServerResponse, RouteGenericInterface, unknown>): FastifyResponseAdapter<Payload>
  • Type parameters

    • Payload

    Parameters

    • res: FastifyReply<Server, IncomingMessage, ServerResponse, RouteGenericInterface, unknown>

    Returns FastifyResponseAdapter<Payload>

Accessors

raw

  • get raw(): FastifyReply<Server, IncomingMessage, ServerResponse, RouteGenericInterface, unknown>
  • Get raw fastify response instance.

    Returns FastifyReply<Server, IncomingMessage, ServerResponse, RouteGenericInterface, unknown>

sent

  • get sent(): boolean
  • inheritdoc

    Returns boolean

Methods

header

  • inheritdoc

    Parameters

    • field: string
    • value: HttpHeaderValue

    Returns FastifyResponseAdapter<Payload>

send

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

    Parameters

    • Optional payload: Payload

    Returns void

status

  • inheritdoc

    Parameters

    • statusCode: HttpStatusCode

    Returns FastifyResponseAdapter<Payload>

type

  • inheritdoc

    Parameters

    • mimeType: string

    Returns FastifyResponseAdapter<Payload>