onRequest method

  1. @override
void onRequest(
  1. DartnessRequest request
)
override

This method is called before the request is executed.

Implementation

@override
void onRequest(DartnessRequest request) {
  startTime = DateTime.now();
  watch = Stopwatch()..start();
  uri = request.requestedUri;
  method = request.method;
  final msg = _message(startTime, request.requestedUri, request.method);
  print(msg);
}