add method

  1. @override
void add(
  1. List<int> bytes
)
override

Appends bytes to the body; commits the response first if needed.

Implementation

@override
void add(List<int> bytes) {
  if (isClosed) {
    throw StateError('The response is closed');
  }
  _commit();
  _body.add(bytes);
  _chunks.add(bytes);
}