requestCachedResponse method
Fetches cache entry.
cacheId
Id of cache that contains the entry.
requestURL
URL spec of the request.
requestHeaders
headers of the request.
Returns: Response read from the cache.
Implementation
Future<CachedResponse> requestCachedResponse(
CacheId cacheId, String requestURL, List<Header> requestHeaders) async {
var result = await _client.send('CacheStorage.requestCachedResponse', {
'cacheId': cacheId,
'requestURL': requestURL,
'requestHeaders': [...requestHeaders],
});
return CachedResponse.fromJson(result['response'] as Map<String, dynamic>);
}