'The C{deliverBody} method of the response object with which the
L{Deferred} returned by L{HTTP11ClientProtocol.request} fires can be
used to get the body of the response.'

def test_receiveResponseBody(self):

    protocol = AccumulatingProtocol()
    whenFinished = protocol.closedDeferred = Deferred()
    requestDeferred = self.protocol.request(Request('GET', '/', _boringHeaders, None))
    self.protocol.dataReceived('HTTP/1.1    200    OK\r\nContent-Length:    6\r\n\r')
    result = []
    requestDeferred.addCallback(result.append)
    self.assertEqual(result, [])
    self.protocol.dataReceived('\n')
    response = result[0]
    response.deliverBody(protocol)
    self.protocol.dataReceived('foo')
    self.protocol.dataReceived('bar')
    def cbAllResponse(ignored):
        self.assertEqual(protocol.data, 'foobar')
        protocol.closedReason.trap(ResponseDone)
    whenFinished.addCallback(cbAllResponse)
    return whenFinished
