Options
All
  • Public
  • Public/Protected
  • All
Menu

Module utils

Index

Type aliases

Context: { request: IncomingMessage & { params: Record<string, string>; query: string; queryParams: Record<string, string> }; response: ServerResponse & { send: any } }

Context object containing the request and response objects.

Type declaration

  • request: IncomingMessage & { params: Record<string, string>; query: string; queryParams: Record<string, string> }
  • response: ServerResponse & { send: any }
Listener: (ctx: Context, next: NextFn) => void

Type declaration

Middleware: Listener | Listener[]

In case if middleware is an array of listeners, it will be executed in sequence

NextFn: () => void

Type declaration

    • (): void
    • Returns void

Functions

  • Parses the body of the given request

    Parameters

    • ctx: Context

      context of the request

    • next: NextFn

      call next middleware

    Returns Promise<void>

Generated using TypeDoc