FetchRequest class

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

Constructors

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

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 Uri?
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>
toMap() Map<String, dynamic>
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?