post<T> function
Implementation
Future<Response> post<T>(
String uri, {
Map<String, String>? headers,
required dynamic body,
}) async {
final info = "(POST) $uri";
report(
"Request $info\nRequestHeader $headers\nRequestBody ${const JsonEncoder.withIndent(" ").convert(body)}",
);
final response = await retry(
() => http.post(
Uri.parse(uri),
headers: headers,
body: toBody(body),
),
);
return transform(info, response);
}