RestMiddleware: ((req: IncomingMessage, res: ServerResponse) => Promise<boolean>)

Type declaration

    • (req: IncomingMessage, res: ServerResponse): Promise<boolean>
    • Middleware type to be executed before endpoint execution on all incoming messages

      Returns

      Promise which, if it resolves to false, the endpoint processing does not continue (In that case, the middleware should take care of responding to the client )

      Parameters

      • req: IncomingMessage

        IncomingMessage from 'http'

      • res: ServerResponse

        ServerResponse from 'http'

      Returns Promise<boolean>

Generated using TypeDoc