delete static method

Future<Map<String, dynamic>?> delete(
  1. String url,
  2. Map<String, dynamic> params
)

delete请求

Implementation

static Future<Map<String,dynamic>?> delete(String url, Map<String, dynamic> params) async {
  try {
    assetDio();
    var result = await _dio!.delete(url, data: FormData.fromMap(params));
    return result.isSuccessful ? result.data : null;
  } on DioException catch (e) {
    return _convertException(e, url, params: params);
  } on SocketException catch (e) {
    return _convertException(e, url, params: params);
  }
}