class documentation

class BoundSyncStream(SyncByteStream):

View In Hierarchy

A byte stream that is bound to a given response instance, and that ensures the response.elapsed is set once the response is closed.
Method __init__ Undocumented
Method __iter__ Undocumented
Method close Subclasses can override this method to release any network resources after a request/response cycle is complete.
Instance Variable ​_response Undocumented
Instance Variable ​_stream Undocumented
Instance Variable ​_timer Undocumented

Inherited from SyncByteStream:

Method read Simple cases can use .read() as a convenience method for consuming the entire stream and then closing it.
def __init__(self, stream, response, timer):

Undocumented

Parameters
stream:SyncByteStreamUndocumented
response:ResponseUndocumented
timer:TimerUndocumented
def __iter__(self):

Undocumented

Returns
typing.Iterator[bytes]Undocumented
def close(self):

Subclasses can override this method to release any network resources after a request/response cycle is complete.

Streaming cases should use a try...finally block to ensure that the stream close() method is always called.

Example:

status_code, headers, stream, extensions = transport.handle_request(...) try:

...
finally:
stream.close()
_response =

Undocumented

_stream =

Undocumented

_timer =

Undocumented