We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 your feature request related to a problem? Please describe. In requests you can do something like this: r.get('https://www.archlinux.org', params={'ids': [1,2,3,4,5,6]}) and the resulting url would be https://www.archlinux.org/?ids=1&ids=2&ids=3&ids=4&ids=5&ids=6
requests
The current behavior in aiohttp is to raise TypeError
aiohttp
TypeError
TypeError: Invalid variable type: value should be str or int, got [1, 2, 3, 4, 5] of type <class 'list'>
💡 Describe the solution you'd like My suggestion is to convert a list like this to list of tuples in the end, i.e.:
params={ some: 1, list_ids: [1,2 ,3 ] }
would look like this:
[('some', 1), ('list_ids', 1), ('list_ids', 2), ('list_ids', 3)]
📋 Additional context If the community decides that this is desirable behavior I am more than willing to work on it.
The text was updated successfully, but these errors were encountered:
@webknjaz is this the behaviour we want to have?
Sorry, something went wrong.
I believe there's been something similar merged into yarl master recently. Check that out first.
Try searching and linking related issues and PRs, if you find something.
aio-libs/yarl#443 #4714
Yeah, here it is.
No branches or pull requests
🐣 Is your feature request related to a problem? Please describe.
In
requests
you can do something like this:r.get('https://www.archlinux.org', params={'ids': [1,2,3,4,5,6]})
and the resulting url would be
https://www.archlinux.org/?ids=1&ids=2&ids=3&ids=4&ids=5&ids=6
The current behavior in
aiohttp
is to raiseTypeError
TypeError: Invalid variable type: value should be str or int, got [1, 2, 3, 4, 5] of type <class 'list'>
💡 Describe the solution you'd like
My suggestion is to convert a list like this to list of tuples in the end, i.e.:
would look like this:
📋 Additional context
If the community decides that this is desirable behavior I am more than willing to work on it.
The text was updated successfully, but these errors were encountered: