aws_request 0.4.0+2
aws_request: ^0.4.0+2 copied to clipboard
Easily create, sign, and send API requests to AWS services without the hassle of implementing Signature Version 4.
example/aws_request.dart
import 'package:aws_request/aws_request.dart';
import 'package:http/http.dart';
Future<void> awsRequestFunction(String logString) async {
final AwsRequest request = AwsRequest(
awsAccessKey: 'awsAccessKey',
awsSecretKey: 'awsSecretKey',
region: 'region',
);
final Response result = await request.send(
type: AwsRequestType.post,
jsonBody: "{'jsonKey': 'jsonValue'}",
service: 'logs',
queryString: {'X-Amz-Expires': '10'},
headers: {'X-Amz-Security-Token': 'XXXXXXXXXXXX'},
);
print(result.statusCode);
}