nitroHttpCacheModeKey top-level constant

String const nitroHttpCacheModeKey

The RequestOptions.extra key that selects a nh.CacheMode for one request.

The value may be a nh.CacheMode or the name of one as a String, so a caller that does not want to import nitro_http can still reach the cache:

await dio.get<String>(
  '/feed',
  options: Options(extra: {nitroHttpCacheModeKey: 'onlyIfCached'}),
);

Implementation

const String nitroHttpCacheModeKey = 'nitroHttp.cacheMode';