deleteResource method

Future<Response> deleteResource(
  1. String type,
  2. String id, {
  3. Map<String, List<String>> headers = const {},
  4. Iterable<QueryEncodable> query = const [],
})

Deletes the resource identified by type and id.

Optional arguments:

  • headers - any extra HTTP headers
  • query - a collection of parameters to be included in the URI query

Implementation

Future<Response> deleteResource(
  String type,
  String id, {
  Map<String, List<String>> headers = const {},
  Iterable<QueryEncodable> query = const [],
}) =>
    send(
        _baseUri.resource(type, id),
        Request.delete()
          ..headers.addAll(headers)
          ..query.mergeAll(query));