FetchRequest class

Class that represents a HTTP request created with JavaScript using the Fetch API.

Constructors

FetchRequest({FetchRequestAction? action = FetchRequestAction.PROCEED, dynamic body, String? cache, FetchRequestCredential? credentials, Map<String, dynamic>? headers, String? integrity, bool? keepalive, String? method, String? mode, String? redirect, String? referrer, ReferrerPolicy? referrerPolicy, WebUri? url})

Properties

action FetchRequestAction?
Indicates the FetchRequestAction that can be used to control the request.
getter/setter pair
body ↔ dynamic
Body of the request.
getter/setter pair
cache String?
The cache mode used by the request.
getter/setter pair
credentials FetchRequestCredential?
The request credentials used by the request.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
headers Map<String, dynamic>?
The HTTP request headers.
getter/setter pair
integrity String?
Contains the subresource integrity value of the request.
getter/setter pair
keepalive bool?
The keepalive option used to allow the request to outlive the page.
getter/setter pair
method String?
The HTTP request method used of the request.
getter/setter pair
mode String?
The mode used by the request.
getter/setter pair
redirect String?
The redirect mode used by the request.
getter/setter pair
referrer String?
A String specifying no-referrer, client, or a URL.
getter/setter pair
referrerPolicy ReferrerPolicy?
The value of the referer HTTP header.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
url WebUri?
The URL of the request.
getter/setter pair

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts instance to a map.
toMap() Map<String, dynamic>
Converts instance to a map.
toString() String
A string representation of this object.
override

Operators

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

Static Methods

fromMap(Map<String, dynamic>? map) FetchRequest?
Gets a possible FetchRequest instance from a Map value.