next method
This method is called on every request.
Calling super.next
will cause invocation of next
method
in the next ApiLink in the chain (if present)
Implementation
@override
Future<Response> next(Request request) async {
_requestsCount++;
_printRequest(request);
if (responseDuration) {
_durations[request.id] = DateTime.now();
}
final response = await super.next(request);
_printResponse(response);
return response;
}