Close the underlying HTTPX client. The client will *not* be usable after this.
(self)
| 869 | return self._client.is_closed |
| 870 | |
| 871 | def close(self) -> None: |
| 872 | """Close the underlying HTTPX client. |
| 873 | |
| 874 | The client will *not* be usable after this. |
| 875 | """ |
| 876 | # If an error is thrown while constructing a client, self._client |
| 877 | # may not be present |
| 878 | if hasattr(self, "_client"): |
| 879 | self._client.close() |
| 880 | |
| 881 | def __enter__(self: _T) -> _T: |
| 882 | return self |