* Switch to aclose on Client
* Fix reference to aclose in API docs
<Response [200 OK]>
```
-Alternatively, you can explicitly close the connection pool without block-usage using `.close()`:
+Alternatively, you can explicitly close the connection pool without block-usage using `.aclose()`:
```python
>>> client = httpx.Client()
>>> try:
... r = await client.get('https://example.com')
... finally:
-... await client.close()
+... await client.aclose()
...
>>> r
<Response [200 OK]>
::: httpx.Client
:docstring:
- :members: headers cookies params request get head options post put patch delete build_request send close
+ :members: headers cookies params request get head options post put patch delete build_request send aclose
## `Response`
trust_env=trust_env,
)
- async def close(self) -> None:
+ async def aclose(self) -> None:
await self.dispatch.close()
async def __aenter__(self) -> "Client":
exc_value: BaseException = None,
traceback: TracebackType = None,
) -> None:
- await self.close()
+ await self.aclose()
def _proxies_to_dispatchers(
) -> None:
await self.response.aclose()
if self.close_client:
- await self.client.close()
+ await self.client.aclose()