HttpxCacheControl.fromHeaderValues constructor
HttpxCacheControl.fromHeaderValues(
- HttpxHeaderValues headerValues
Implementation
factory HttpxCacheControl.fromHeaderValues(HttpxHeaderValues headerValues) {
final entries = headerValues.expand<MapEntry<String, String?>>((e) {
final tmp = e.split('=');
return [
MapEntry(tmp.first, tmp.length > 1 ? tmp.skip(1).join('=') : null),
];
});
return HttpxCacheControl.fromMap(Map<String, String?>.fromEntries(entries));
}