getUri method
Implementation
Future<String> getUri(
Uri url, {
bool readCache = true,
bool writeCache = true,
Duration? ttl,
Map<String, String> headers = const {},
String Function(List<int>)? defaultCharset,
String Function(List<int>)? forcedCharset,
}) async {
final cachedResp = readCache ? getCache(url, headers) : null;
if (cachedResp != null) return cachedResp;
final req = await _client.getUrl(url);
headers.forEach(req.headers.set);
return _finishRequest(req, writeCache, defaultCharset, forcedCharset,
(r) => setCache(url, headers, r, ttl));
}