Skip to content

feat: implement static route #72

Closed
@francescovallone

Description

Description

A static route is a route that does not use the request context, but returns a result independently of it. In Serinus this can be achived creating a similar on method of the controller called onStatic and modifying the RouteData class to expose the isStatic flag.

The RequestHandler should also be modified to reflect this change. A static RouteData should be immediately resolved without passing from the handle function.

Requirements

  • Add the onStatic method to the controller;
  • Modify the documentation to reflect this change;
  • Change the RouteData class;
  • Change the behaviour of the RequestHandler;
  • Add tests

Metadata

Labels

enhancementNew feature or requestnice to haveFeature that will be good to implement but it is not a priority

Projects

  • Status

    Closed

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions