URLRequest class Null safety

A URL load request that is independent of protocol or URL scheme.

Constructors

URLRequest({required Uri? url, String? method, Map<String, String>? headers, Uint8List? body, bool? iosAllowsCellularAccess, bool? iosAllowsConstrainedNetworkAccess, bool? iosAllowsExpensiveNetworkAccess, IOSURLRequestCachePolicy? iosCachePolicy, bool? iosHttpShouldHandleCookies, bool? iosHttpShouldUsePipelining, IOSURLRequestNetworkServiceType? iosNetworkServiceType, double? iosTimeoutInterval, Uri? iosMainDocumentURL})

Properties

body Uint8List?
The data sent as the message body of a request, such as for an HTTP POST request.
read / write
hashCode int
The hash code for this object. [...]
read-only, inherited
headers Map<String, String>?
A dictionary containing all of the HTTP header fields for a request.
read / write
iosAllowsCellularAccess bool?
A Boolean value indicating whether the request is allowed to use the built-in cellular radios to satisfy the request. [...]
read / write
iosAllowsConstrainedNetworkAccess bool?
A Boolean value that indicates whether the request may use the network when the user has specified Low Data Mode. [...]
read / write
iosAllowsExpensiveNetworkAccess bool?
A Boolean value that indicates whether connections may use a network interface that the system considers expensive. [...]
read / write
iosCachePolicy IOSURLRequestCachePolicy?
The request’s cache policy. [...]
read / write
iosHttpShouldHandleCookies bool?
A Boolean value indicating whether cookies will be sent with and set for this request. [...]
read / write
iosHttpShouldUsePipelining bool?
A Boolean value indicating whether the request should transmit before the previous response is received. [...]
read / write
iosMainDocumentURL Uri?
The main document URL associated with this request. This URL is used for the cookie “same domain as main document” policy. [...]
read / write
iosNetworkServiceType IOSURLRequestNetworkServiceType?
The service type associated with this request. [...]
read / write
iosTimeoutInterval double?
The timeout interval of the request. [...]
read / write
method String?
The HTTP request method. [...]
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
url Uri?
The URL of the request.
read / write

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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) URLRequest?