delete function

Future<Response> delete(
  1. String endpoint,
  2. String accessToken
)

Implementation

Future<http.Response> delete(String endpoint, String accessToken) {
  Uri url = Uri.parse("$apiUrl$endpoint");

  Map<String, String> headers = {
    'Content-Type': 'application/json',
    'Authorization': "Bearer $accessToken",
  };

  return http.delete(url, headers: headers);
}