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