AbortableStreamedRequest class final
A StreamedRequest which supports abortion using abortTrigger.
A future breaking version of 'package:http' will merge this into StreamedRequest, making it a requirement.
- Inheritance
-
- Object
- BaseRequest
- StreamedRequest
- AbortableStreamedRequest
- Mixed-in types
- Available extensions
Constructors
-
AbortableStreamedRequest(String method, Uri url, {Future<
void> ? abortTrigger})
Properties
-
abortTrigger
→ Future<
void> ? -
Completion of this future aborts this request (if the client supports
abortion).
final
- contentLength ↔ int?
-
The size of the request body, in bytes.
getter/setter pairinherited
- finalized → bool
-
Whether finalize has been called.
no setterinherited
- followRedirects ↔ bool
-
Whether the client should follow redirects while resolving this request.
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, String> -
The HTTP headers sent to the server.
finalinherited
- maxRedirects ↔ int
-
The maximum number of redirects to follow when followRedirects is true.
getter/setter pairinherited
- method → String
-
The HTTP method of the request.
finalinherited
- persistentConnection ↔ bool
-
Whether a persistent connection should be maintained with the server.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
sink
→ StreamSink<
List< int> > -
The sink to which to write data that will be sent as the request body.
no setterinherited
- url → Uri
-
The URL to which the request will be sent.
finalinherited
Methods
-
copyWith(
{HttpMethod? method, Uri? url, Map< String, String> ? headers, bool? followRedirects, int? maxRedirects, bool? persistentConnection, dynamic body, Encoding? encoding, Map<String, String> ? fields, List<MultipartFile> ? files, Stream<List< ? stream}) → BaseRequestint> > -
Available on BaseRequest, provided by the BaseRequestCopyWith extension
Creates a new instance of BaseRequest based of onthis. It copies all the properties and overrides the ones sent via parameters. -
copyWith(
{HttpMethod? method, Uri? url, Map< String, String> ? headers, Stream<List< ? stream, bool? followRedirects, int? maxRedirects, bool? persistentConnection}) → StreamedRequestint> > -
Available on StreamedRequest, provided by the StreamedRequestCopyWith extension
Creates a new instance of StreamedRequest based of onthis. It copies all the properties and overrides the ones sent via parameters. -
finalize(
) → ByteStream -
Freezes all mutable fields and returns a single-subscription ByteStream
that emits the data being written to sink.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
send(
) → Future< StreamedResponse> -
Sends this request.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited