1
0
mirror of https://github.com/kevin1024/vcrpy.git synced 2025-12-09 17:15:35 +00:00

Merge pull request #234 from tobiowo/decode-compressed-response

Decode compressed response option
This commit is contained in:
Ivan 'Goat' Malison
2015-12-31 10:18:34 -08:00
5 changed files with 171 additions and 1 deletions

View File

@@ -255,6 +255,21 @@ that of ``before_record``:
with my_vcr.use_cassette('test.yml'):
# your http code here
Decode compressed response
---------------------------
When the ``decode_compressed_response`` keyword argument of a ``VCR`` object
is set to True, VCR will decompress "gzip" and "deflate" response bodies
before recording. This ensures that these interactions become readable and
editable after being serialized.
.. note::
Decompression is done before any other specified `Custom Response Filtering`_.
This option should be avoided if the actual decompression of response bodies
is part of the functionality of the library or app being tested.
Ignore requests
---------------