Create an HTTP client context manager.
(
base_url: Optional[str] = None,
**kwargs,
)
| 114 | |
| 115 | |
| 116 | @asynccontextmanager |
| 117 | async def create_client( |
| 118 | base_url: str | None = None, |
| 119 | **kwargs, |
| 120 | ) -> AsyncIterator[HTTPClient]: |
| 121 | """Create an HTTP client context manager.""" |
| 122 | client = HTTPClient(base_url=base_url, **kwargs) |
| 123 | try: |
| 124 | yield client |
| 125 | finally: |
| 126 | await client.close() |
nothing calls this directly
no test coverage detected