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 || forceCache) ? getCache(url) : null;
if (cachedResp != null) return cachedResp;
final req = await _client.getUrl(url);
headers.forEach((k, v) => req.headers.add(k, v));
return _finishRequest(req, writeCache, defaultCharset, forcedCharset,
(r) => setCache(url, r, ttl));
}