aws_request 1.1.0  aws_request: ^1.1.0 copied to clipboard
aws_request: ^1.1.0 copied to clipboard
Easily create, sign, and send API requests to AWS services without the hassle of implementing Signature Version 4.
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);
}