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