Get the underlying httpx.Client, constructing a new one if not previously set
(self)
| 78 | return self |
| 79 | |
| 80 | def get_httpx_client(self) -> httpx.Client: |
| 81 | """Get the underlying httpx.Client, constructing a new one if not previously set""" |
| 82 | if self._client is None: |
| 83 | self._client = httpx.Client( |
| 84 | base_url=self._base_url, |
| 85 | cookies=self._cookies, |
| 86 | headers=self._headers, |
| 87 | timeout=self._timeout, |
| 88 | verify=self._verify_ssl, |
| 89 | follow_redirects=self._follow_redirects, |
| 90 | **self._httpx_args, |
| 91 | ) |
| 92 | return self._client |
| 93 | |
| 94 | def __enter__(self) -> "Client": |
| 95 | """Enter a context manager for self.client—you cannot enter twice (see httpx docs)""" |
no outgoing calls
no test coverage detected