dioDelete static method
dynamic
dioDelete({})
Delete request of DIO
Implementation
static dioDelete({required String urlPath, Map<String, dynamic>? queryPara, Map<String, dynamic>? headers}) async {
try {
final res = await _dio.delete(urlPath, queryParameters: queryPara, options: Options(headers: headers));
return res;
} on PlatformException catch (e) {
return Failure(UnifiedHttpClientEnum.platformExceptionError, 'Platform Exception Caught :$e');
} on SocketException catch (e) {
return Failure(UnifiedHttpClientEnum.socketExceptionError, 'Socket Exception:$e');
} on FormatException catch (e) {
return Failure(UnifiedHttpClientEnum.formatExceptionError, 'format exception Error : $e');
} on DioException catch (e) {
return Failure(UnifiedHttpClientEnum.undefined, 'Dio Exception in multipart: ${e.message}');
} catch (e) {
return Failure(UnifiedHttpClientEnum.undefined, 'something went Wrong : $e');
}
}