Skip to content

Commit

Permalink
chore: made signer private and used AWSHttpRequest.get method directl…
Browse files Browse the repository at this point in the history
…y rather than calling it through AWSHttpRequest
  • Loading branch information
khatruong2009 committed Sep 5, 2023
1 parent d0c006a commit d418dc0
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class DefaultRemoteLoggingConstraintProvider
DateTime? _lastUpdated;

/// The signer to sign the request.
static const signer = AWSSigV4Signer();
static const _signer = AWSSigV4Signer();

Timer? _timer;

Expand Down Expand Up @@ -75,14 +75,14 @@ class DefaultRemoteLoggingConstraintProvider
Future<LoggingConstraint?> _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,
);
Expand Down

0 comments on commit d418dc0

Please sign in to comment.