CacheSettings.fromJson constructor

CacheSettings.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory CacheSettings.fromJson(Map<String, dynamic> json) {
  return CacheSettings(
    allowedHTTPMethods: json['allowedHTTPMethods'] as String?,
    cachedHTTPMethods: json['cachedHTTPMethods'] as String?,
    defaultTTL: json['defaultTTL'] as int?,
    forwardedCookies: json['forwardedCookies'] != null
        ? CookieObject.fromJson(
            json['forwardedCookies'] as Map<String, dynamic>)
        : null,
    forwardedHeaders: json['forwardedHeaders'] != null
        ? HeaderObject.fromJson(
            json['forwardedHeaders'] as Map<String, dynamic>)
        : null,
    forwardedQueryStrings: json['forwardedQueryStrings'] != null
        ? QueryStringObject.fromJson(
            json['forwardedQueryStrings'] as Map<String, dynamic>)
        : null,
    maximumTTL: json['maximumTTL'] as int?,
    minimumTTL: json['minimumTTL'] as int?,
  );
}