From d418dc052c9795ff72cf4b904595249e0440ede7 Mon Sep 17 00:00:00 2001 From: Kha Truong <64438356+khatruong2009@users.noreply.github.com> Date: Tue, 5 Sep 2023 14:34:24 -0700 Subject: [PATCH] chore: made signer private and used AWSHttpRequest.get method directly rather than calling it through AWSHttpRequest --- .../lib/src/remote_constraint_provider.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/logging_cloudwatch/aws_logging_cloudwatch/lib/src/remote_constraint_provider.dart b/packages/logging_cloudwatch/aws_logging_cloudwatch/lib/src/remote_constraint_provider.dart index b2c13bbbd1..40c7f743fd 100644 --- a/packages/logging_cloudwatch/aws_logging_cloudwatch/lib/src/remote_constraint_provider.dart +++ b/packages/logging_cloudwatch/aws_logging_cloudwatch/lib/src/remote_constraint_provider.dart @@ -47,7 +47,7 @@ class DefaultRemoteLoggingConstraintProvider DateTime? _lastUpdated; /// The signer to sign the request. - static const signer = AWSSigV4Signer(); + static const _signer = AWSSigV4Signer(); Timer? _timer; @@ -75,14 +75,14 @@ class DefaultRemoteLoggingConstraintProvider Future _fetchConstraintFromEndpoint() async { final uri = Uri.parse(_config.endpoint); - final request = AWSHttpRequest(method: AWSHttpMethod.get, uri: uri); + final request = AWSHttpRequest.get(uri); final scope = AWSCredentialScope( region: _config.region, service: AWSService.apiGatewayManagementApi, ); - final signedRequest = await signer.sign( + final signedRequest = await _signer.sign( request, credentialScope: scope, );