delete<T> method
Implementation
Future<BasicModel> delete<T>(
String path, {
Map<String, dynamic>? params,
Object? data,
dynamic tag,
bool? loading,
bool dataToJson = true,
Options? options,
CancelToken? cancelToken,
}) async {
assert(_singleton != null, '请先调用 initialize');
if (hasNetWork) return notNetWorkModel;
_addLoading(loading);
data = basicDioOptions.extraData?.call(path, data) ?? data;
final res = await dio.delete<T>(path,
options: _initBasicOptions(options, path),
params: basicDioOptions.extraParams?.call(path, params) ?? params,
cancelToken: cancelToken,
data: dataToJson ? jsonEncode(data) : data);
return _response(res, tag);
}