AWSHttpRequest constructor

AWSHttpRequest({
  1. required AWSHttpMethod method,
  2. required Uri uri,
  3. Map<String, String>? headers,
  4. List<int>? body,
  5. bool? followRedirects,
  6. int? maxRedirects,
})

A parameterized HTTP request.

The request is typically passed to a signer for signing, although it can be used unsigned as well for sending unauthenticated requests.

Implementation

AWSHttpRequest({
  required super.method,
  required Uri uri,
  super.headers,
  List<int>? body,
  super.followRedirects,
  super.maxRedirects,
})  : bodyBytes = body ?? const [],
      contentLength = body?.length ?? 0,
      super._(
        scheme: uri.scheme,
        host: uri.host,
        port: uri.hasPort ? uri.port : null,
        path: uri.path,
        queryParameters: uri.hasQuery ? uri.queryParametersAll : null,
      );