delete<T> method
Implementation
Future<Response<T>> delete<T>(String url,
{Map<String, String>? headers,
String? contentType,
Map<String, dynamic>? query,
Decoder<T>? decoder,
ResponseInterceptor<T>? responseInterceptor}) async {
try {
var response = await _performRequest<T>(
() async =>
_delete<T>(url, contentType, query, decoder, responseInterceptor),
headers: headers,
);
return response;
} on Exception catch (e) {
if (!errorSafety) {
throw GetHttpException(e.toString());
}
return Future.value(Response<T>(
statusText: 'Can not connect to server. Reason: $e',
));
}
}