question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Implement support for specifying query string params in URI templates

See original GitHub issue

When adding a route, support the inclusion of query string params in the template string. We can take inspiration from RFC 6570 but we’ll also want to support filters/validators. Parsed values for the params could either be passed via keyword arguments to responders (that default to None) or be made accessible via the Request object (TBD).

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
bonicimcommented, Jun 22, 2021

get_param

Thanks, @CaselIT, for the clarification. I tried ‘get_param’ yesterday but saw that my curl call was failing to recognize the url with query parameters. Then I realized this morning that since I am using zsh instead of sh, I need to enclose my url with quotations so that it gets interpreted as a literal. Without the quotations, zsh was expanding the ? and = characters. I just realized that the examples in the docs assume that you are using sh and thus do not enclose the url with quotations. Either way, lesson learned. Always enclose your url’s with quotation marks.

0reactions
bonicimcommented, Jun 22, 2021

Hi @bonicim ! Unless you object I’m going to close this issue as a duplicate of #838, it seems they are identical.

We also have an umbrella discussion for routing improvements: #1818

No objection. Feel free to close it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Additional/Optional query string parameters in URI ...
when I call CreateUserAccount with method POST it is working fine but when I call GetUser method using GET and sending only one...
Read more >
REST API Design Best Practices for Parameter and Query ...
Where to put the parameters for APIs? Best practices for parameter and query string usage in REST APIs.
Read more >
Add support for query string parameters in route templates
I'm basically making my own server that wraps an external API, but does some processing on some of the functions, and is accessed...
Read more >
A Beginner's Guide to URL Parameters
In this comprehensive guide, we explore the ins and outs of URL parameters. Discover now how to use query strings without hurting your ......
Read more >
URI Templates
Use URI Templates in your API Blueprint. ... + Parameters + id - A path variable that is required for a valid URL...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found