• The listener for one REST endpoint. Before the body is read, the call's authentication is read onto its context and checked by ServerOpts.authenticate, and the middlewares run; then the endpoint is called with the request and the context, and its response is sent as JSON (204 for none), unless it answered the call itself. An error thrown along the way is answered as answerError says.

    Type Parameters

    Parameters

    Returns ((req: IncomingMessage, res: ServerResponse, params?: Record<string, string>) => Promise<void>)

      • (req: IncomingMessage, res: ServerResponse, params?: Record<string, string>): Promise<void>
      • Parameters

        • req: IncomingMessage
        • res: ServerResponse
        • Optional params: Record<string, string>

        Returns Promise<void>

Generated using TypeDoc