Type alias RestMiddleware
RestMiddleware: ((req: IncomingMessage, res: ServerResponse) => Promise<boolean>)
Type declaration
-
- (req: IncomingMessage, res: ServerResponse): Promise<boolean>
-
Parameters
-
req: IncomingMessage
-
res: ServerResponse
Returns 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 )