-
Notifications
You must be signed in to change notification settings - Fork 327
Extract named query parameter #147
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
Labels
feature
A feature that's ready for implementation
Comments
niklasf
added a commit
to niklasf/tide
that referenced
this issue
Mar 7, 2019
Related: #108 |
This should be easier to explore now that #156 has landed! |
#175 addresses this feature. |
secretfader
pushed a commit
to secretfader/tide
that referenced
this issue
Apr 23, 2019
Resolve http-rs#147 by adding query string extraction and validation via the `ExtractQuery` trait, implemented for `tide::Context`.
secretfader
pushed a commit
to secretfader/tide
that referenced
this issue
Apr 23, 2019
Resolve http-rs#147 by adding query string extraction and validation via the `ExtractQuery` trait, implemented for `tide::Context`.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature Request
Extract named parameters from query strings (
?param1=foo¶m2=bar
).Detailed Description
tide supports query extraction (#14) using
UrlQuery
. For example:UrlQuery<T>
parsesT
usingFromStr
, but if we want to parse the query and extract individual parameters we're on our own.Context
Working with query parameters is common in all kinds of applications.
Possible Implementation
Looking at tide itself, it could be implemented similarly to named segments. Alternatives from other frameworks:
FromForm
trait. Function parameter is marked as query string in route declaration.Query<T: Deserialize>
newtype using serde_urlencoded.Extract
trait. Function parameter must be namedquery_string
.The actix-web approach might be best for Tide, because no macro magic is involved. (Well ... except that in Serde).
The text was updated successfully, but these errors were encountered: