Skip to content

Supporting optional path parameter and regex match #18

@ashokgelal

Description

@ashokgelal

Is it possible to mark a path parameter as optional? Something like route("GET", "/users/<user>/blogs/<blog>/posts/<post?>", handler("get user blog post")), where the last parameter <post> is optional.

Along the same line, it'd be great if rut supported regex match something like route("GET", "/img/<path:.*>", handler("get image")).

The regex one isn't that important but just a nice to have.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions