Cors class

Represents a CORS configuration. Supported only for HTTP APIs. See Configuring CORS for more information.

Constructors

Cors({bool? allowCredentials, List<String>? allowHeaders, List<String>? allowMethods, List<String>? allowOrigins, List<String>? exposeHeaders, int? maxAge})
Cors.fromJson(Map<String, dynamic> json)
factory

Properties

allowCredentials bool?
Specifies whether credentials are included in the CORS request. Supported only for HTTP APIs.
final
allowHeaders List<String>?
Represents a collection of allowed headers. Supported only for HTTP APIs.
final
allowMethods List<String>?
Represents a collection of allowed HTTP methods. Supported only for HTTP APIs.
final
allowOrigins List<String>?
Represents a collection of allowed origins. Supported only for HTTP APIs.
final
exposeHeaders List<String>?
Represents a collection of exposed headers. Supported only for HTTP APIs.
final
hashCode int
The hash code for this object.
no setterinherited
maxAge int?
The number of seconds that the browser should cache preflight request results. Supported only for HTTP APIs.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

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