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

Class ResponseStream

httpx/_transports/default.py:121–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119
120
121class ResponseStream(SyncByteStream):
122 def __init__(self, httpcore_stream: typing.Iterable[bytes]) -> None:
123 self._httpcore_stream = httpcore_stream
124
125 def __iter__(self) -> typing.Iterator[bytes]:
126 with map_httpcore_exceptions():
127 for part in self._httpcore_stream:
128 yield part
129
130 def close(self) -> None:
131 if hasattr(self._httpcore_stream, "close"):
132 self._httpcore_stream.close()
133
134
135class HTTPTransport(BaseTransport):

Callers 1

handle_requestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected