FetchRequest<T extends BaseRequest> class

Wraps request to provide fetch options overrides.

Constructors

FetchRequest(T request, {Future<void>? abortTrigger})
Create new fetch request by wrapping existing request.

Properties

abortTrigger Future<void>?
Completion of this future aborts this request (if the client supports abortion).
final
cache RequestCache?
The cache mode which controls how the request will interact with the browser's HTTP cache.
getter/setter pair
contentLength int?
The size of the request body, in bytes.
getter/setter pair
credentials RequestCredentials?
The credentials mode, defines what browsers do with credentials (cookies, HTTP authentication entries, and TLS client certificates).
getter/setter pair
finalized bool
Whether finalize has been called.
no setter
followRedirects bool
Whether the client should follow redirects while resolving this request.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, String>
The HTTP headers sent to the server.
no setter
integrity String?
The subresource integrity value of the request (e.g.,sha256-BpfBw7ivV8q2jLiT13fxDYAe2tJllusRSZ273h2nFSE=).
getter/setter pair
maxRedirects int
The maximum number of redirects to follow when followRedirects is true.
getter/setter pair
method String
The HTTP method of the request.
no setter
mode RequestMode?
The mode of the request.
getter/setter pair
persistentConnection bool
Whether a persistent connection should be maintained with the server.
getter/setter pair
redirectPolicy RedirectPolicy?
The redirect policy of the request, defines how client should handle BaseRequest.followRedirects.
getter/setter pair
referrer String?
The referrer of the request. This can be a same-origin URL, about:client, or an empty string.
getter/setter pair
referrerPolicy RequestReferrerPolicy?
The referrer policy of the request.
getter/setter pair
request → T
Inner request to send.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url Uri
The URL to which the request will be sent.
no setter

Methods

finalize() → ByteStream
Finalizes the HTTP request in preparation for it being sent.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
send() Future<FetchResponse>
Sends this request.
toString() String
A string representation of this object.
inherited

Operators

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