-
Notifications
You must be signed in to change notification settings - Fork 152
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
Value less query params are not preserved exactly #22
Comments
A user's expectation of >>> f = furl('http://www.google.com/')
>>> f.args['sup'] = None
>>> f.url
'http://www.google.com/?sup=' instead of >>> f = furl('http://www.google.com/')
>>> f.args['sup'] = None
>>> f.url
'http://www.google.com/?sup' I can't recall the last time I saw the latter in the wild. The current behavior serializes >>> f = furl('http://www.google.com/')
>>> f.args['sup'] = None
>>> f.url
'http://www.google.com/?sup=None' But I agree: I'll ruminate on a potential solution for Do you have any other ideas? |
Why not |
Yes, thats how I meant it. @gruns: |
That's how I understood @ulope. The problem is the aforementioned breaks user expectations. That said, I don't see an obviously better way of supporting >>> f = furl('http://www.google.com/')
>>> f.args['sup'] = furl.EMPTY
>>> f.url
'http://www.google.com/?sup' But that's mediocre at best. Any other ideas before I implement |
Support for query parameters without a trailing >>> f = furl('http://sprop.su')
>>> f.args['param'] = None
>>> f.url
'http://sprop.su/?param' Upgrade with
Thank you for bringing this issue to my attention @ulope. |
👍 |
This fails:
I have to talk to a very picky web-service that needs a specific parameter to have no value (and not an empty value). However Furl generates
?param=
with an empty value. Maybe usingNone
for no value would work?The text was updated successfully, but these errors were encountered: