delete method

Future delete({
  1. required String url,
  2. Map<String, String>? header,
  3. Object? body,
})

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;
}