delete function
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);
}