StreamedRequest class

An HTTP request where the request body is sent asynchronously after the connection has been established and the headers have been sent.

When the request is sent via BaseClient.send, only the headers and whatever data has already been written to StreamedRequest.stream will be sent immediately. More data will be sent as soon as it's written to StreamedRequest.sink, and when the sink is closed the request will end.

Inheritance

Constructors

StreamedRequest(String method, Uri url)
Creates a new streaming request.

Properties

contentLength int
The size of the request body, in bytes. [...]
read / write, inherited
finalized bool
Whether finalize has been called.
read-only, inherited
followRedirects bool
Whether the client should follow redirects while resolving this request. [...]
read / write, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
headers Map<String, String>
final, inherited
maxRedirects int
The maximum number of redirects to follow when followRedirects is true. [...]
read / write, inherited
method String
The HTTP method of the request. [...]
final, inherited
persistentConnection bool
Whether a persistent connection should be maintained with the server. [...]
read / write, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
sink EventSink<List<int>>
The sink to which to write data that will be sent as the request body. [...]
read-only
url Uri
The URL to which the request will be sent.
final, inherited

Methods

finalize() ByteStream
Freezes all mutable fields other than stream and returns a single-subscription ByteStream that emits the data being written to sink.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
send() Future<StreamedResponse>
Sends this request. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited