Get the body of an IResponse and return it as a byte string.

This is a helper function for clients that don't want to incrementally receive the body of an HTTP response.

ParametersresponseThe HTTP response for which the body will be read. (type: IResponse provider)
ReturnsA Deferred which will fire with the body of the response. Cancelling it will close the connection to the server immediately.
Function cancel Cancel a readBody call, close the connection to the HTTP server immediately, if it is still open.
Function getAbort Undocumented
def cancel(deferred): (source)

Cancel a readBody call, close the connection to the HTTP server immediately, if it is still open.

ParametersdeferredThe cancelled defer.Deferred.
def getAbort(): (source)
Undocumented
API Documentation for Twisted, generated by pydoctor at 2020-03-20 23:54:06.