mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
HeadersDict is a subclass of CaseInsensitiveDict with two new features:
1. Preserve the case of the header key from the first time it was set.
This means that later munging won't modify the key case. (You can
force picking up the new case with `del` followed by setting.)
2. If the value is a list or tuple, unpack it and store the first
element. This is the same as how `Request.add_header()` used to work.
For backward compatibility this commit preserves `Request.add_header()` but
marks it deprecated.
3.6 KiB
3.6 KiB