diff --git a/CHANGES/2688.doc b/CHANGES/2688.doc new file mode 100644 index 00000000000..1298f9fd668 --- /dev/null +++ b/CHANGES/2688.doc @@ -0,0 +1 @@ +Fixed mistype in `Proxy Support` section where `trust_env` parameter was used in `session.get("http://python.org", trust_env=True)` method instead of aiohttp.ClientSession constructor as follows: `aiohttp.ClientSession(trust_env=True)`. diff --git a/docs/client_advanced.rst b/docs/client_advanced.rst index 5e4957d09db..2c4b19624ee 100644 --- a/docs/client_advanced.rst +++ b/docs/client_advanced.rst @@ -498,8 +498,8 @@ constructor for extracting proxy configuration from *HTTP_PROXY* or *HTTPS_PROXY* *environment variables* (both are case insensitive):: - async with aiohttp.ClientSession() as session: - async with session.get("http://python.org", trust_env=True) as resp: + async with aiohttp.ClientSession(trust_env=True) as session: + async with session.get("http://python.org") as resp: print(resp.status) Proxy credentials are given from ``~/.netrc`` file if present (see