This repository has been archived by the owner on Mar 18, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 278
Allow resource controller endpoints to take query params as optional arguments #4
Comments
Implemented in 40dc2d8 |
Closed
Closed
Good! Now, how does one construct the URL? The routing doc here, https://aqueduct.io/docs/http/routing/ doesn't mention anything about query params routes construction |
Closed
Closed
By wrapping an argument in curly brackets:
This is documented here: http://aqueduct.io/docs/http/resource_controller/#optional-bindings |
@EddieKamau , when I use
and don´t send any query parameters, I receive the
Can you help me please? |
Closed
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
An endpoint could have optional arguments to automatically grab query parameters. These shouldn't impact routing or which handler gets the query parameters. A signature for a handler could then look like this:
@httpget
Future getThings({String location, String name}) {}
where name and location are names of query parameters (case insensitive) and if they exist, those arguments are populated.
The text was updated successfully, but these errors were encountered: