Skip to content

feat: allow passing Path Parameters as handler parameters  #74

Closed
@francescovallone

Description

Description

Right now the only reference to the path parameters is inside the RequestContext. This feature aims to allow a second type of access to them using the function parameters.

Example:
on(Route.get('/<id>'), (RequestContext context, String id) async => id)

This syntax should be allowed after the merge of this feature.

Requirements

  • Allow to pass path parameters as function parameters;
  • The function parameters are only positional, not named or optional;
  • The parameters must be still accessible from the context to ensure that the hooks and everything else works correctly;

Metadata

Labels

api stabilizationChanges to stabilize the API of the frameworkdocumentationImprovements or additions to documentationenhancementNew feature or request

Projects

  • Status

    Closed

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions