diff --git a/src/requests/structures.py b/src/requests/structures.py index 188e13e482..373add3b9c 100644 --- a/src/requests/structures.py +++ b/src/requests/structures.py @@ -6,6 +6,7 @@ """ from collections import OrderedDict +from collections.abc import MutableMapping from .compat import Mapping, MutableMapping @@ -77,7 +78,10 @@ def copy(self): return CaseInsensitiveDict(self._store.values()) def __repr__(self): - return str(dict(self.items())) + return str({k: v for k, (casedkey, v) in self._store.items()}) + + def lower_items(self): + return ((k.lower(), v) for k, (casedkey, v) in self._store.items()) class LookupDict(dict):