deleteFromDB function

Future<Map> deleteFromDB({
  1. required String api,
  2. required String apiKey,
})

Implementation

Future<Map> deleteFromDB({required String api, required String apiKey}) async {
  final http.Response response = await http.delete(
    Uri.parse(api),
    headers: <String, String>{
      'Content-Type': 'application/json',
      'X-CC-Version': '2018-03-22',
      'X-CC-Api-Key': apiKey,
    },
  );

  return jsonDecode(response.body);
}