WebConfig class
Configuration for web requests.
Constructors
- WebConfig.new({WebConfigRequestMode mode = WebConfigRequestMode.noCors, WebConfigRequestCredentials credentials = WebConfigRequestCredentials.sameOrigin, WebConfigRequestCache cache = WebConfigRequestCache.byDefault, String referrer = '', WebConfigRequestReferrerPolicy referrerPolicy = WebConfigRequestReferrerPolicy.strictOriginWhenCrossOrigin, WebConfigRedirectPolicy redirectPolicy = WebConfigRedirectPolicy.alwaysFollow, bool streamRequests = false})
- Create a new web configuration.
Properties
- cache → WebConfigRequestCache
-
The cache mode which controls how requests will interact with
the browser's HTTP cache.
final
- credentials → WebConfigRequestCredentials
-
The credentials mode, defines what browsers do with credentials.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- mode → WebConfigRequestMode
-
The request mode.
final
- redirectPolicy → WebConfigRedirectPolicy
-
The redirect policy, defines how client should handle redirects.
final
- referrer → String
-
The referrer.
This can be a same-origin URL,
about:client
, or an empty string.final - referrerPolicy → WebConfigRequestReferrerPolicy
-
The referrer policy.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- streamRequests → bool
-
Whether to use streaming for requests.
final
Methods
-
copyWith(
{WebConfigRequestMode? mode, WebConfigRequestCredentials? credentials, WebConfigRequestCache? cache, String? referrer, WebConfigRequestReferrerPolicy? referrerPolicy, WebConfigRedirectPolicy? redirectPolicy, bool? streamRequests}) → WebConfig - Creates a copy of this configuration with the given fields replaced with the new values.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override