newRequest method

  1. @override
Request newRequest()
inherited

Constructs a new Request that will use this client to send the request. Throws a StateError if this client has been closed.

Implementation

@override
Request newRequest() {
  verifyNotClosed();
  // ignore: deprecated_member_use_from_same_package
  final request = MockPlainTextRequest.fromClient(this, _transport);
  registerAndDecorateRequest(request);
  return request;
}