interceptWithAlice method
Intercept http request with alice. This extension method provides additional helpful method to intercept https' response.
Implementation
Future<Response> interceptWithAlice(
AliceHttpAdapter adapter, {
dynamic body,
}) async {
final startTime = DateTime.now();
final response = await this;
final endTime = DateTime.now();
adapter.onResponse(
response,
body: body,
duration: endTime.difference(startTime),
);
return response;
}