Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Response<TResponse, TErrorResponse>

Type parameters

  • TResponse

  • TErrorResponse

Hierarchy

  • Response

Index

Constructors

constructor

  • new Response(response: express.Response, requestURL: string): Response

Methods

badRequest

  • badRequest(data?: TErrorResponse | StormError): void

conflict

  • conflict(data?: TErrorResponse | StormError): void

error

  • error(error?: TErrorResponse | ResponseData<TErrorResponse>): void

forbidden

  • forbidden(data?: TErrorResponse | StormError): void

getStatus

internalError

  • internalError(data?: TErrorResponse | StormError): void

isHeadersSent

  • isHeadersSent(): boolean

notFound

  • notFound(data?: TErrorResponse | StormError): void

pipe

  • pipe(stream: ReadableStream): void

redirect

  • redirect(url: string): void

send

setHeader

  • setHeader(key: string, value: string): void

setHeaders

setStatus

success

  • success(data?: TResponse): void

unauthorized

  • unauthorized(data?: TErrorResponse | StormError): void

Generated using TypeDoc