close method
Prevents more data from being written to the response, and locks it entire from further editing.
Implementation
@override
Future close() async {
if (!_isDetached && !_isClosed && !isBuffered) {
_openStream();
await stream.outgoingMessages.close();
}
_isClosed = true;
await super.close();
}