-
-
Notifications
You must be signed in to change notification settings - Fork 944
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 support for query string parameters in route templates #838
Comments
This is EXACTLY what I'm after. I'm basically making my own server that wraps an external API, but does some processing on some of the functions, and is accessed by ajax so need to avoid CORS and my own caching. I've added a route decorator and basically do this.
Of course the 'timestamp' param in the above example does not get passed as **kwargs, but for all simple "/" param based API calls, it's saved me a LOT of time and effort, and is quite elegant. Then in the super I do
I wish I knew how to work around this, but I've only been using Falcon since yesterday. 👍 and it would be nice if the querystring arguments could be used for routing. |
Given this has generated only a limited interest from the community, I think we want to keep the default router focused solely on routing based on |
We can borrow from RFC 6570 syntax and do something like this:
'/things{?count,detailed}'
Note that all params would default to None if present. I'm assuming we would just pass these as kwargs to the responder method.
Filters could be specified by extending RFC 6570, i.e:
'/things{?count:int,detailed:bool}'
The text was updated successfully, but these errors were encountered: