extractHeaderMapValues function
Implementation
Map<String, String>? extractHeaderMapValues(
Map<String, String>? headers, String name) {
if (headers == null) return null;
return Map<String, String>.fromEntries(headers.entries
.where((e) => e.key.toLowerCase().startsWith(name.toLowerCase()))
.map((e) => MapEntry(e.key.substring(name.length), e.value)));
}