delete method

  1. @override
Future<Response> delete(
  1. Uri url, {
  2. Map<String, String>? headers,
  3. Object? body,
  4. Encoding? encoding,
})
override

Sends an HTTP DELETE request with the given headers to the given URL. It checks first to see if there is a client, if there is it uses the client assuming it has authorization information, otherwise it calls the newHeaders method to obtain headers and makes the request

Implementation

@override
Future<http.Response> delete(Uri url,
        {Map<String, String>? headers,
        Object? body,
        Encoding? encoding}) async =>
    client == null
        ? await http.delete(
            url,
            headers: await newHeaders(headers),
            body: body,
            encoding: encoding,
          )
        : await client!.delete(
            url,
            headers: headers,
            body: body,
            encoding: encoding,
          );