1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-09 17:15:35 +00:00
Files
vcrpy/vcr
Kevin McCarthy 5e295e0603 Serialize dict of lists, use dicts internally
There is a weird quirk in HTTP.  You can send the same header twice.
For this reason, headers are represented by a dict, with lists as the
values.  However, it appears that HTTPlib is completely incapable of
sending the same header twice.  This puts me in a weird position: I want
to be able to accurately represent HTTP headers in cassettes, but I
don't want the extra step of always having to do [0] in the general
case, i.e.  request.headers['key'][0]

In addition, some servers sometimes send the same header more than once,
and httplib *can* deal with this situation.

Futhermore, I wanted to keep the request and response cassette format as
similar as possible.

For this reason, in cassettes I keep a dict with lists as keys, but once
deserialized into VCR, I keep them as plain, naked dicts.
2014-05-03 17:39:12 -10:00
..
2013-12-01 14:38:46 -10:00
2014-04-30 02:38:01 +02:00
2014-04-27 11:29:06 -10:00
2014-05-03 15:25:31 -10:00
2014-05-03 15:25:31 -10:00
2014-05-03 15:25:31 -10:00
2014-05-04 02:12:48 +02:00
2014-04-26 21:30:43 -10:00