toJson method
Implementation
Map<String, dynamic> toJson() {
final allowedHeaders = this.allowedHeaders;
final allowedOrigins = this.allowedOrigins;
final allowedMethods = this.allowedMethods;
final exposeHeaders = this.exposeHeaders;
final maxAgeSeconds = this.maxAgeSeconds;
return {
'AllowedHeaders': allowedHeaders,
'AllowedOrigins': allowedOrigins,
if (allowedMethods != null)
'AllowedMethods': allowedMethods.map((e) => e.toValue()).toList(),
if (exposeHeaders != null) 'ExposeHeaders': exposeHeaders,
if (maxAgeSeconds != null) 'MaxAgeSeconds': maxAgeSeconds,
};
}