Close the underlying HTTPX client. The client will *not* be usable after this.
(self)
| 1041 | return self._client.is_closed |
| 1042 | |
| 1043 | def close(self) -> None: |
| 1044 | """Close the underlying HTTPX client. |
| 1045 | |
| 1046 | The client will *not* be usable after this. |
| 1047 | """ |
| 1048 | # If an error is thrown while constructing a client, self._client |
| 1049 | # may not be present |
| 1050 | if hasattr(self, "_client"): |
| 1051 | self._client.close() |
| 1052 | |
| 1053 | def __enter__(self: _T) -> _T: |
| 1054 | return self |