AWSHttpRequest class
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.
- Inheritance
-
- Object
- AWSBaseHttpRequest
- AWSHttpRequest
- Annotations
-
- @immutable
Constructors
-
AWSHttpRequest.new({required AWSHttpMethod method, required Uri uri, Map<
String, String> ? headers, List<int> ? body, bool? followRedirects, int? maxRedirects}) - A parameterized HTTP request.
-
AWSHttpRequest.delete(Uri uri, {List<
int> ? body, Map<String, String> ? headers, bool? followRedirects, int? maxRedirects}) -
Creates a
DELETE
request foruri
. -
AWSHttpRequest.get(Uri uri, {Map<
String, String> ? headers, bool? followRedirects, int? maxRedirects}) -
Creates a
GET
request foruri
. -
AWSHttpRequest.head(Uri uri, {Map<
String, String> ? headers, bool? followRedirects, int? maxRedirects}) -
Creates a
HEAD
request foruri
. -
AWSHttpRequest.patch(Uri uri, {List<
int> ? body, Map<String, String> ? headers, bool? followRedirects, int? maxRedirects}) -
Creates a
PATCH
request foruri
. -
AWSHttpRequest.post(Uri uri, {List<
int> ? body, Map<String, String> ? headers, bool? followRedirects, int? maxRedirects}) -
Creates a
POST
request foruri
. -
AWSHttpRequest.put(Uri uri, {List<
int> ? body, Map<String, String> ? headers, bool? followRedirects, int? maxRedirects}) -
Creates a
PUT
request foruri
. -
AWSHttpRequest.raw({required AWSHttpMethod method, String scheme = 'https', required String host, int? port, required String path, Map<
String, Object> ? queryParameters, Map<String, String> ? headers, List<int> ? body, bool? followRedirects, int? maxRedirects}) - Creates a "raw", or unprocessed, HTTP request. Since the Uri constructor will normalize paths by default, this constructor provides an escape hatch for situations when paths are already normalized and further processing could interfere with downstream activities like signing.
Properties
-
body
→ Stream<
List< int> > -
The request's body stream.
no setteroverride
-
bodyBytes
→ List<
int> -
The collected bytes of the body stream.
final
- contentLength → int
-
The request's content length.
final
- followRedirects → bool
-
Whether to automatically follow redirects.
finalinherited
- hasContentLength → bool
-
Whether the request has a known content length.
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, String> -
The case-insensitive headers of the request.
finalinherited
- host → String
-
The host for the request.
finalinherited
- maxRedirects → int
-
If followRedirects is
true
, sets the maximum number of redirects before the request is terminated and an exception is thrown.finalinherited - method → AWSHttpMethod
-
The method of the request.
finalinherited
- path → String
-
The path of the request.
finalinherited
- port → int?
-
The port of the request.
finalinherited
-
queryParameters
→ Map<
String, String> -
Query parameters for the request.
no setterinherited
-
queryParametersAll
→ Map<
String, List< String> > -
All query parameters for the request.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scheme → String
-
The scheme of the request, e.g.
https
.finalinherited - uri → Uri
-
The URI of the request.
latefinalinherited
Methods
-
close(
) → Future< void> - Indicates that no more branches will be requested via split.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
read(
) → AWSHttpRequest -
Reads body fully and returns a flattened AWSHttpRequest.
override
-
send(
{AWSHttpClient? client, FutureOr< void> onCancel()?}) → AWSHttpOperation<AWSBaseHttpResponse> -
Sends the HTTP request.
inherited
-
split(
) → Stream< List< int> > - Returns a single-subscription stream that's a copy of the input stream.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited