delete function

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

Sends an HTTP DELETE request with the given headers to the given URL.

Implementation

Future<Response> delete(String url,
    {Map<String, String>? headers, Object? body, Encoding? encoding}) async {
  http_request.Response apiResponse = await http_request.post(Uri.parse(url),
      headers: headers, body: body, encoding: encoding);
  return Response(
      apiResponse.statusCode,
      apiResponse.body,
      apiResponse.bodyBytes,
      apiResponse.contentLength,
      apiResponse.headers,
      apiResponse.isRedirect,
      apiResponse.persistentConnection,
      apiResponse.reasonPhrase,
      apiResponse.request);
}