add support to request.url_for for query parameters
See original GitHub issueI totally misunderstood url_for
’s API, I was expecting url_for('some_route', foo='bar')
to return 'http://testserver/my_route/?foo=bar'
.
I understand why that is now, but what is the best way to generate urls like this? (for pagination in a rest list api in this case).
Could url_for
grow support for query parameters in addition to path parameters?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:31
- Comments:14 (6 by maintainers)
Top Results From Across the Web
Adding a parameter to the URL with JavaScript - Stack Overflow
In a web application that makes use of AJAX calls, I need to submit a request but add a parameter to the end...
Read more >An SEO Guide to URL Parameter Handling
URL parameters create duplicate content, waste crawl budget, and dilute ranking signals. Learn six ways to avoid potential SEO issues with ...
Read more >Using Query Parameters (AWS Signature Version 4)
Authenticate requests using the query parameters to express a request entirely in a URL. ... For Amazon S3, the AWS-service string is s3...
Read more >Filter a report using query string parameters in the URL
One way to filter it is to start with the default URL for the report, add the filter parameters to the URL, and...
Read more >Query Parameters - Branch.io
They are extensions of the URL that are used to help define specific content or actions based on the data being passed. To...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
are there any updates?
We probably want to differentiate it more clearly from the properties on the URL class. (
.params
might just as well indicate a property on the class..with_query()
makes it kinda clear that it’s going to return a new URL.)I think we probably want to end up with…
.query_params
- A QueryParams datastructure..query_string
- A raw string..with_query(...)
- A new URL.