Part of bzrlib.smart.message View In Hierarchy
Known subclasses: bzrlib.smart.message.ConventionalResponseHandler, bzrlib.smart.protocol.SmartClientRequestProtocolOne
Method | read_response_tuple | Reads and returns the response tuple for the current request. |
Method | read_body_bytes | Read and return some bytes from the body. |
Method | read_streamed_body | Returns an iterable that reads and returns a series of body chunks. |
Method | cancel_read_body | Stop expecting a body for this response. |
Parameters | expect_body | a boolean indicating if a body is expected in the response. Some protocol versions needs this information to know when a response is finished. If False, read_body_bytes should not be called afterwards. Defaults to False. |
Returns | tuple of response arguments. |
Parameters | count | if specified, read up to this many bytes. By default, reads the entire body. |
Returns | str of bytes from the response body. |
If expect_body was passed to read_response_tuple, this cancels that expectation (and thus finishes reading the response, allowing a new request to be issued). This is useful if a response turns out to be an error rather than a normal result with a body.