Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add catch-all routes #35

Merged
merged 2 commits into from Feb 24, 2023
Merged

Add catch-all routes #35

merged 2 commits into from Feb 24, 2023

Conversation

rawleyfowler
Copy link
Owner

Fixes #30

This allows the user to:

use v6.d;

use Humming-Bird;

get('/foo/**', -> $request, $response { $request.write('Foo **!') });

# Now all requests to /foo/** will hit that end point

# However, you can still define
get('/foo/bar', -> $request, $response { $request.write('Foo Bar!') });

# /foo/bar --> Foo Bar!
# /foo/baz --> Foo **!

@rawleyfowler rawleyfowler merged commit 3914192 into main Feb 24, 2023
@rawleyfowler rawleyfowler deleted the catchall branch February 24, 2023 21:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add catch-all routes
1 participant