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': ''},
  );

  validate(resp, expect: 200);

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