postWithTimeout method
Implementation
Future<Response> postWithTimeout(Map<String, dynamic> bodyMap) {
return this
.post(fromUriOrString(this.endpoint), body: json.encode(bodyMap))
.timeout(
const Duration(seconds: kRequestTimeoutSeconds),
onTimeout: () {
return Response(
json.encode(kTimeoutResponsePayload),
408,
headers: this.requestHeaders,
);
},
);
}