Response

See here

Implemented methods

  • send

  • pipe

  • json (same as send, but for compatibility we keep this method)

  • sendFile

  • redirect

  • status

  • writeHead

  • cookie

  • setCookie

  • hasCookie

  • removeCookie

  • setHeader

  • getHeader

  • hasHeader

  • removeHeader

  • setHeaders

  • writeHeaderValues

  • writeHeaders

  • type

  • header

Examples

Redirect + Params example

sendFile

File should be on the same path where JS file is or you can try Absolute path for stream/sendFile

Last updated

Was this helpful?