Package com.spec.web.expresso.middleware
Interface Middleware
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
The following functional interface will act as a middleware.
Where it accepts three parameters req, res and next() where
-
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(HttpRequest req, HttpResponse res, MiddlewareContext ctx) The following method is implemented by user.
-
Method Details
-
execute
The following method is implemented by user. Modifying the http request and modify the response. The MiddlewareFlowController.next() is used to call the next middleware on the queue.- Parameters:
req- the http requestres- the http responsectx- MiddlewareFlowController
-