alibabacloud_oss_sdk_dart 1.0.2 copy "alibabacloud_oss_sdk_dart: ^1.0.2" to clipboard
alibabacloud_oss_sdk_dart: ^1.0.2 copied to clipboard

Alibaba Cloud Object Storage Service (OSS) SDK for Dart, providing comprehensive APIs for bucket and object operations.

example/main.dart

import 'package:alibabacloud_oss_sdk_dart/alibabacloud_oss_sdk_dart.dart';

/// Minimal example for `pub.dev`.
///
/// Before running:
/// - Set `OSS_ACCESS_KEY_ID`
/// - Set `OSS_ACCESS_KEY_SECRET`
/// - Replace the region, bucket, and object key placeholders
Future<void> main() async {
  const region = 'cn-hangzhou';
  const bucket = 'example-bucket';
  const key = 'example-object.txt';

  final config = Configuration.defaultConfig()
      .withRegion(region)
      .withCredentialsProvider(EnvironmentCredentialsProvider());

  final client = Client(config);

  final result = await client.headObject(
    HeadObjectRequest(bucket: bucket, key: key),
  );

  print('HeadObject status: ${result.statusCode}');
  print('Request ID: ${result.requestId}');
}
0
likes
160
points
0
downloads

Documentation

API reference

Publisher

verified publishertheogony.cn

Weekly Downloads

Alibaba Cloud Object Storage Service (OSS) SDK for Dart, providing comprehensive APIs for bucket and object operations.

Repository (GitHub)
View/report issues

Topics

#oss #alibaba-cloud #object-storage #cloud

License

Apache-2.0 (license)

Dependencies

convert, crypto, dio, intl, meta, mime, path, xml

More

Packages that depend on alibabacloud_oss_sdk_dart