getObjectTagging method

Future<COSTagging> getObjectTagging({
  1. String? bucketName,
  2. String? region,
  3. required String objectKey,
  4. String? versionId,
})
inherited

GET Object tagging 接口用于查询指定对象下已有的对象标签。 bucketName region objectKey versionId

Implementation

Future<COSTagging> getObjectTagging({
  String? bucketName,
  String? region,
  required String objectKey,
  String? versionId,
}) async {
  final Response response = await client.get(
    '${getBaseApiUrl(bucketName, region)}/$objectKey?tagging',
    queryParameters: <String, String>{
      if (versionId != null) 'versionId': versionId,
    },
  );
  return toXml<COSTagging>(response)(COSTagging.fromXml);
}