close method

  1. @override
void close({
  1. bool force = true,
})
override

Closes the client.

This terminates all active requests.

Implementation

@override
void close({bool force = true}) {
  _isClosed = true;

  // If the close is forced (default) then abort all pending requests.
  if (force) {
    for (var xhr in _xhrs) {
      xhr.abort();
    }
  }

  _xhrs.clear();
}