Quantcast
Channel: User bavaza - Stack Overflow
Viewing all articles
Browse latest Browse all 45

Storing response as json in Python requests-cache

$
0
0

I'm using requests-cache to cache http responses in human-readable format.I've patched requests using the filesystem backend, and the the serializer to json, like so:

import requests_cacherequests_cache.install_cache('example_cache', backend='filesystem', serializer='json')

The responses do get cached as json, but the response's body is encoded (I guess using the cattrs library, as described here).

Is there a way to make requests-cache save responses as-is?


Viewing all articles
Browse latest Browse all 45

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>