Actions
Actions are invoked on route match.
Action can return a promise or an object that will be passed to res.send
with status code 200
It can also call response directly res.send("ok")
.
#
Request Decorators#
Req, Resinject request, response in to action params
#
Queryinject query object,in to action params
#
Bodyinject body object,in to action params
#
Headersinject body object,in to action params
#
Paramsinject params object,in to action params
#
Custom Requestyou can define you own custom request action parameters
#
Response Decorators#
StatusCodespecify a custom statusCode default 200
#
Headersspecify a custom response header
#
Gzipit is possible to compress the response with gzip by calling res.gzip
#
Cache Controlspecify Cache-Control header in seconds
#
Custom Responseyou can define your own custom action response decorators