post method
POST
Implementation
Future<dynamic> post({required String url, required Object? body, Map<String, String>? header}) async {
dynamic responseJson;
try {
final response = await http.post(Uri.parse(url), headers: headers ?? header, body: body);
responseJson = _returnResponse(response);
} on SocketException {
throw FetchDataException('No Internet connection');
}
return responseJson;
}