Skip to content
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

Parameters not shown in response url #372

Closed
danielnelson opened this issue May 19, 2015 · 2 comments
Closed

Parameters not shown in response url #372

danielnelson opened this issue May 19, 2015 · 2 comments
Labels

Comments

@danielnelson
Copy link
Contributor

The documentation says you can inspect the response url attribute to see that the query parameters were encoded correctly, but this does not seem to be the case:

$ cat tmp.py 
import asyncio
import aiohttp

def run():
    payload = {'key1': 'value1', 'key2': 'value2'}
    r = yield from aiohttp.request('get', 'http://httpbin.org/get', params=payload)
    print(r.url)

asyncio.get_event_loop().run_until_complete(run())
$ python3.4 tmp.py 
http://httpbin.org/get

I expected it to print http://httpbin.org/get?key2=value2&key1=value1

@asvetlov
Copy link
Member

Thanks for bug report.
We should override .url in ClientResponse.update_path as well as self.path.

@danielnelson would you prepare Pull Request with code and test?

@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants