AWSStreamedHttpRequest constructor
AWSStreamedHttpRequest({})
@{macro aws_common.aws_http_streamed_request}
For signed requests, body
is read once, in chunks, as it is sent to AWS.
It is recommended that contentLength
be provided so that body
does not
have to be read twice, since the content length must be known when
calculating the signature.
Implementation
AWSStreamedHttpRequest({
required super.method,
required Uri uri,
super.headers,
Stream<List<int>>? body,
int? contentLength,
super.followRedirects,
super.maxRedirects,
}) : _body = body ?? const Stream.empty(),
_contentLength = contentLength,
super._(
scheme: uri.scheme,
host: uri.host,
port: uri.hasPort ? uri.port : null,
path: uri.path,
queryParameters: uri.hasQuery ? uri.queryParametersAll : null,
) {
_setContentTypeIfProvided(body);
}