[Question] Decoding gzipped content for storage?
See original GitHub issueThis question is related to something I encountered when using before migrating to polly, but I see that the persisted recordings (.har files) store gzipped content text in encoded form.
I’d really like to have my recordings be human-readable (and editable), so I’d like to find a way to decode content as it’s persisted, then re-encode it when it’s read.
Is there a way to do this in polly?
Here’s an example I found of how to do something similar with nock (https://github.com/nock/nock/issues/1212), but I don’t really see any way to get at polly’s underlying nock implementation or any mechanism for extending the reading/writing of .har files.
UPDATE: it looks like my best bet may be to create a custom persister that wraps the FSPersister
, manipulating the recorded data in findRecording
and saveRecording
… I’ll update this issue with my findings.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Sure, will do.
@jrnail23 that seems like a bug in Polly. Can you open a separate issue for that?