deleteObject method
Implementation
Future<void> deleteObject({
required String bucket,
required String key,
String? region,
Map<String, String>? headers,
Map<String, String>? params,
}) async {
return send(COSFetchConfig(
bucket: bucket,
key: key,
method: 'DELETE',
region: region,
headers: headers,
params: params,
resHandlers: [
(fetchContext, data) async {
final res = fetchContext.res;
if (res?.statusCode != HttpStatus.noContent) {
throw await COSException.fromResponse(res);
}
}
]));
}