When builtin handlers cannot satisfy business need, custom route handlers come to the rescue.
The custom route handler requires entity generation and programming.
Model route handler
Let's start with a custom model with a custom route handler.
Run entity generation:
Write logics for the handler:
Custom route handler group
Some handlers may not belong to a model. In these cases, use a custom handler group instead.
In the programming side, alter define_model_handler_group with define_handler_group.
Custom HTTP method
Teo supports custom HTTP methods.
Path parameters
Teo supports path parameters.
To retrieve path parameters, access it from the context.