Notify when the response to this request has finished.

ReturnsA Deferred which will be triggered when the request is finished -- with a None value if the request finishes successfully or with an error if the request is interrupted by an error (for example, the client closing the connection prematurely). (type: Deferred)
NoteThere are some caveats around the reliability of the delivery of this notification.
  1. If this Request's channel is paused, the notification will not be delivered. This can happen in one of two ways; either you can call request.transport.pauseProducing yourself, or,
  2. In order to deliver this notification promptly when a client disconnects, the reactor must continue reading from the transport, so that it can tell when the underlying network connection has gone away. Twisted Web will only keep reading up until a finite (small) maximum buffer size before it gives up and pauses the transport itself. If this occurs, you will not discover that the connection has gone away until a timeout fires or until the application attempts to send some data via Request.write.
  3. It is theoretically impossible to distinguish between successfully sending a response and the peer successfully receiving it. There are several networking edge cases where the Deferreds returned by notifyFinish will indicate success, but the data will never be received. There are also edge cases where the connection will appear to fail, but in reality the response was delivered. As a result, the information provided by the result of the Deferreds returned by this method should be treated as a guess; do not make critical decisions in your applications based upon it.
API Documentation for Twisted, generated by pydoctor at 2020-03-20 23:54:06.