send method
Make API request by triggering ApiLinks next
methods
Implementation
@override
Future<Response> send(Request request) async {
final networkResponse = await super.send(request);
/// Save cache when response is successful and request contains a key.
if (shouldUpdateCache(request, networkResponse)) {
/// Make sure that request contains CacheKey.
_throwOnRequestWithoutCacheKey(request);
await cache.write(request.key, networkResponse);
}
return networkResponse;
}