postApi<T> method
Implementation
Future<T> postApi<T>(
Uri uri,
dynamic body,
T Function(dynamic value) mapperFunction, {
Map<String, String>? headers,
}) async {
headers = getHeaders(headers ?? {});
var newBody = getRequestBody(body);
log(newBody, name: 'requestBody');
var caller = client
.post(
uri,
body: newBody,
headers: headers,
)
.timeout(timeout);
return _callApi(caller, mapperFunction);
}