Interface ApiModule.RouteHandler
- Enclosing class:
ApiModule
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Method Summary
-
Method Details
-
handle
- Parameters:
args- URL segments that follow the route's base path, in orderip- Client IP — sourced fromX-Real-IPheader when behind a reverse proxy- Returns:
- JSON string to send as the response body, or
nullto return a 400 - Throws:
Exception- Any uncaught exception is caught by the server and returned as a JSON error
-