httpPost method
Implementation
Future<http.Response> httpPost({
String? url,
String? requestBody,
Map<String, String>? headers,
}) async {
print('Request body:' + requestBody!);
var response = await http.post(Uri.parse(url!),
body: requestBody,
headers: headers ??
{
HttpHeaders.contentTypeHeader: "application/json",
});
print('Response body:' + response.body);
return response;
}