MCPcopy
hub / github.com/encode/httpx / AsyncResponseStream

Class AsyncResponseStream

httpx/_transports/default.py:265–276  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263
264
265class AsyncResponseStream(AsyncByteStream):
266 def __init__(self, httpcore_stream: typing.AsyncIterable[bytes]) -> None:
267 self._httpcore_stream = httpcore_stream
268
269 async def __aiter__(self) -> typing.AsyncIterator[bytes]:
270 with map_httpcore_exceptions():
271 async for part in self._httpcore_stream:
272 yield part
273
274 async def aclose(self) -> None:
275 if hasattr(self._httpcore_stream, "aclose"):
276 await self._httpcore_stream.aclose()
277
278
279class AsyncHTTPTransport(AsyncBaseTransport):

Callers 1

handle_async_requestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected