close method

  1. @override
Future close()
override

Close the target consumer.

NOTE: Writes to the IOSink may be buffered, and may not be flushed by a call to close(). To flush all buffered writes, call flush() before calling close().

Implementation

@override
Future close() async {
  _headers.lock();
  await flush();
  scheduleMicrotask(_stream.close);
  _done.complete();
  //return await _done.future;
}