diff --git a/CHANGELOG.md b/CHANGELOG.md index 4691722..0a11156 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [0.2.1] - 2022/01/08 + +* Fixed issue with rejected headers on web + ## [0.2.0+1] - 2021/09/17 * Updated package description diff --git a/lib/aws_request.dart b/lib/aws_request.dart index 526df2f..e9d58fc 100644 --- a/lib/aws_request.dart +++ b/lib/aws_request.dart @@ -55,10 +55,7 @@ class AwsRequest { /// The timeout on the request Duration timeout; static const Map _defaultHeaders = { - 'User-Agent': 'Dart (dart:io)', - 'Accept-Encoding': 'gzip, deflate', 'Accept': '*/*', - 'Connection': 'keep-alive', 'Content-Type': 'application/x-amz-json-1.1', }; @@ -226,35 +223,14 @@ class AwsRequest { String auth, ) { return { - 'User-Agent': 'Dart (dart:io)', - 'Accept-Encoding': 'gzip, deflate', - 'Accept': '*/*', - 'Connection': 'keep-alive', - 'Keep-Alive': - 'timeout=${timeout.inSeconds > 0 ? timeout.inSeconds : 1}, max=1000', - 'Content-Type': 'application/x-amz-json-1.1', + ..._defaultHeaders, 'Authorization': auth, 'X-Amz-Date': amzDate, 'x-amz-target': target, - 'host': host, - 'content-length': utf8.encode(requestBody).length.toString(), ...headers }; } - String _constructUrl( - String host, - String canonicalUri, - Map canonicalQuerystring, - ) { - return Uri( - scheme: 'https', - host: host, - path: canonicalUri, - queryParameters: canonicalQuerystring, - ).toString(); - } - Map _validateRequest( String? service, String? target, diff --git a/pubspec.yaml b/pubspec.yaml index 9cd864d..b919efb 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: aws_request description: Easily create, sign, and send API requests to AWS services without the hassle of implimenting Signature Version 4. -version: 0.2.0+1 +version: 0.2.1 homepage: https://github.com/Zsmerritt/Flutter_AWS_Request environment: