postAsync<TReceive> method
Runs a POST operation via HttpClient to send information.
Implementation
Future<TerraRestfulResponse> postAsync<TReceive>(
String endpoint, String data) async {
var response = await clientService.postAsync(endpoint, data);
if (response.statusCode != 200) {
throw Exception(
"Status Code: ${response.statusCode}, Reason: ${response.reasonPhrase}");
}
return await deserializeResponse(response);
}