getBucketPolicy method

Future<Map<String, dynamic>?> getBucketPolicy(
  1. dynamic bucket

Get the bucket policy associated with the specified bucket. If objectPrefix is not empty, the bucket policy will be filtered based on object permissions as well.


Future<Map<String, dynamic>?> getBucketPolicy(bucket) async {

  final resp = await _client.request(
    method: 'GET',
    bucket: bucket,
    resource: 'policy',

  validate(resp, expect: 200);

  return json.decode(resp.body);