getBucketNotification method

Future<NotificationConfiguration> getBucketNotification(
  1. String bucket
)

Return the list of notification configurations stored in the S3 provider

Implementation

Future<NotificationConfiguration> getBucketNotification(String bucket) async {
  MinioInvalidBucketNameError.check(bucket);

  final resp = await _client.request(
    method: 'GET',
    bucket: bucket,
    resource: 'notification',
  );

  validate(resp, expect: 200);

  final node = xml.XmlDocument.parse(resp.body);
  return NotificationConfiguration.fromXml(node.rootElement);
}