getObjectACL method

Future<AccessControlPolicy> getObjectACL(
  1. String bucket,
  2. String object
)

Implementation

Future<AccessControlPolicy> getObjectACL(String bucket, String object) async {
  MinioInvalidBucketNameError.check(bucket);
  MinioInvalidObjectNameError.check(object);

  final resp = await _client.request(
    method: 'GET',
    bucket: bucket,
    object: object,
    queries: {'acl': ''},
  );

  return AccessControlPolicy.fromXml(
    xml.XmlDocument.parse(resp.body)
        .findElements('AccessControlPolicy')
        .first,
  );
}