toJson method

  1. @override
Object toJson()

Implementation

@override
Object toJson() => {
  if (cacheBypassRequestHeaderNames.isNotDefault)
    'cacheBypassRequestHeaderNames': cacheBypassRequestHeaderNames,
  'cacheKeyPolicy': ?cacheKeyPolicy?.toJson(),
  'cacheMode': ?cacheMode,
  'clientTtl': ?clientTtl?.toJson(),
  'defaultTtl': ?defaultTtl?.toJson(),
  'maxTtl': ?maxTtl?.toJson(),
  'negativeCaching': ?negativeCaching,
  if (negativeCachingPolicy.isNotDefault)
    'negativeCachingPolicy': [
      for (final i in negativeCachingPolicy) i.toJson(),
    ],
  'requestCoalescing': ?requestCoalescing,
  'serveWhileStale': ?serveWhileStale?.toJson(),
};