deletex<T> method

Future<Response> deletex<T>(
  1. String path, {
  2. Options? queryParams,
  3. Object? body,
})

Implementation

Future<dio_instance.Response> deletex<T>(String path,
    {Options? queryParams, Object? body}) async {
  try {
    Map<String, String> headers = await CommonHelper()
        .getHearder(headerParams, baseOptions, queryParams);
    headers = Map.from(headers)..addAll(headerDefault);
    // var response =
    //     await delete(Uri.parse(path), headers: headers, body: body);
    dio_instance.Response response;
    response = await dio.delete(path,
        options: dio_instance.Options(headers: headers), data: body);
    return Future.value(response);
  } on FormatException catch (_) {
    throw const FormatException("Unable to process the data");
  } on dio_instance.DioError catch (e) {
    throw e.response?.data;
  }
}