URLSessionConfiguration class
Controls the behavior of a URLSession.
Constructors
- URLSessionConfiguration.backgroundSession(String identifier)
-
A configuration suitable for performing HTTP uploads and downloads in
the background.
factory
- URLSessionConfiguration.defaultSessionConfiguration()
-
A configuration that uses caching and saves cookies and credentials.
factory
- URLSessionConfiguration.ephemeralSessionConfiguration()
-
A session configuration that uses no persistent storage for caches,
cookies, or credentials.
factory
Properties
- allowsCellularAccess ↔ bool
-
Whether connections over a cellular network are allowed.
getter/setter pair
- allowsConstrainedNetworkAccess ↔ bool
-
Whether connections are allowed when the user has selected Low Data Mode.
getter/setter pair
- allowsExpensiveNetworkAccess ↔ bool
-
Whether connections are allowed over expensive networks.
getter/setter pair
- cache ↔ URLCache?
-
The URLCache used to cache the results of URLSessionTasks.
getter/setter pair
- discretionary ↔ bool
-
Whether background tasks can be delayed by the system.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
-
httpAdditionalHeaders
↔ Map<
String, String> ? -
Additional headers to send with each request.
getter/setter pair
- httpCookieAcceptPolicy ↔ HTTPCookieAcceptPolicy
-
What policy to use when deciding whether to accept cookies.
getter/setter pair
- httpMaximumConnectionsPerHost ↔ int
-
The maximum number of connections that a URLSession can have open to the
same host.
See NSURLSessionConfiguration.HTTPMaximumConnectionsPerHost.
getter/setter pair
- httpShouldSetCookies ↔ bool
-
Whether requests should include cookies from the cookie store.
getter/setter pair
- httpShouldUsePipelining ↔ bool
-
Whether to use HTTP pipelining.
getter/setter pair
- multipathServiceType ↔ URLSessionMultipathServiceType
-
What type of Multipath TCP connections to use.
getter/setter pair
- networkServiceType ↔ URLRequestNetworkService
-
Provides in indication to the operating system on what type of requests
are being sent.
getter/setter pair
- requestCachePolicy ↔ URLRequestCachePolicy
-
Controls how to deal with response caching.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sessionSendsLaunchEvents ↔ bool
-
Whether the app should be resumed when background tasks complete.
getter/setter pair
- shouldUseExtendedBackgroundIdleMode ↔ bool
-
Whether connections will be preserved if the app moves to the background.
getter/setter pair
- timeoutIntervalForRequest ↔ Duration
-
The timeout interval if data is not received.
getter/setter pair
- waitsForConnectivity ↔ bool
-
Whether tasks should wait for connectivity or fail immediately.
getter/setter pair
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited