跳到主要内容
版本:Next

HttpServerResponse <CTX>

Hierarchy

Index

Constructors

constructor

  • Type parameters

Methods

blob

  • blob(data: Buffer, mimeType?: string): any

fail

file

  • file(filePath: string, mimeType?: string): any

header

headers

html

  • html(data: string): any

json

  • json(data: Record<any, any>): any

redirect

  • redirect(url: string, status?: number): any

sse

status

stream

success

text

  • text(data: string): any

staticBLOB_TPL

  • BLOB_TPL<CTX>(data: Buffer, isSuccess: boolean, ctx: CTX): unknown
  • Type parameters

staticFILE_TPL

  • FILE_TPL<CTX>(data: Readable, isSuccess: boolean, ctx: CTX): Readable

staticHTML_TPL

  • HTML_TPL<CTX>(data: string, isSuccess: boolean, ctx: CTX): unknown

staticJSON_TPL

  • JSON_TPL<CTX>(data: Record<any, any>, isSuccess: boolean, ctx: CTX): unknown
  • Type parameters

staticSSE_TPL

staticSTREAM_TPL

  • STREAM_TPL<CTX>(data: unknown, ctx: CTX): unknown

staticTEXT_TPL

  • TEXT_TPL<CTX>(data: string, isSuccess: boolean, ctx: CTX): unknown
  • Type parameters