-
Notifications
You must be signed in to change notification settings - Fork 10
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
Is there such a thing as an optional param
?
#11
Comments
Hello and thank your for your issue. I'm really sorry to only get back to you so late, I haven't find an effective way follow my issues. At first glance I'd say this looks like an odd use-case. Could you give me a real-world API where this makes sense ? |
Not a problem, as you can tell I am also as bad in getting back to things like this. The use case is like this. I have an image service I use and can not change. most of the time I want to set the size of the image I get. But sometime I want the max size image and to do that I need to remove the size from the URL. I have the URLs in config but with the need to have the full template with no optional params I need to have 2 of everything. config:
This mean I need to have a more complex
Update: I have tried to do it for you but the way that UrlAssembler handles unused params and query string had mad it hard for me, I will try again at some point but I need to get v2 to work on. |
Alright I see. I also use these services from time to time :) |
Hi. I have been using your URL Assembler for some time but now I need a way to have a param optional. at the moment I only need the last one optional but I have a test for it in the middle of a
template
. Is there a way I can do this now or would this be a new feature?If it is a new feature how would I get around the query params messing with
?
.test.js
Terminal Output:
The text was updated successfully, but these errors were encountered: