You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[feature required] does we can add the timeout or proxy parameters directly #711
Connector has much more options than just proxy_auth. Moreover, params for TCPConnector and UnixConnector are ambiguous. Putting all together makes a mess. Recommended way to create session with proxy is ClientSession(connector=ProxyConnector(proxy, proxy_auth=BasicAuth(login, password)).
You still may use your own Client class provided above in your code.
Proposed timeout parameter works only for connection establishment and sending request headers.
It doesn't include time for sending request body and retrieving response back.
Most likely users need both.
The recommended way is using Timeout class:
with aiohttp.Timeout(0.001):
async with aiohttp.get('https://github.com') as r:
await r.text()
Activity
asvetlov commentedon Dec 28, 2015
Sorry, I've declined your feature request.
ClientSession(connector=ProxyConnector(proxy, proxy_auth=BasicAuth(login, password)).You still may use your own
Clientclass provided above in your code.timeoutparameter works only for connection establishment and sending request headers.It doesn't include time for sending request body and retrieving response back.
Most likely users need both.
The recommended way is using
Timeoutclass:a358003542 commentedon Dec 28, 2015
OK, listening and learned.
lock commentedon 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.