-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: Allow Recordings to be Saved Decoded and Unzipped #463
Comments
I just discovered @Justintime50 that if you disable compression in your headers you can get it to work
https://stackoverflow.com/questions/18398022/disable-gzip-compression-in-chrome we shouldn't have to do that but its a temporary workaround |
@Josiassejod1 although that works, it's not ideal for our situation. The code we are using to accomplish this can be found here: https://github.com/EasyPost/easypost-node/pull/253/files#diff-34ee99ca00f431605c35bbb1974fb5cad2c5cd3c076ff29165d24d490c619459 (the PR is large but the file you want is the |
I feel you on that @Justintime50 would rather this be an option that can be toggled |
I think this would be useful as well. For comparison the vcr gem in the Ruby world does this. The reason is that it allows us to easily see what is really being requested and responded. |
Description
Per the comment made here: #265 (comment), it was suggested that adding the ability to allow recordings to be saved decoded and unzipped could be added to Pollyjs. We have open sourced various client libraries across 7 languages, each with its own "VCR" solution like Polly, each allowing for the recordings to be unzipped and decoded for manual inspection which is important to us. At present, we'd have to setup a lot of boilerplate code via
beforePersist
to get Polly to decode/unzip all requests/responses when this is an ideal first class feature of Polly itself so that engineers can ensure the responses look like what we expect in a human readable fashion like we can using other language VCR solutions.For our purposes, we needed to ensure it takes chunked responses into account as well and concatenated each chunk, decompressed them, then turned them into storable strings for the recording file itself. We then reversed the process for
beforeReplay
.The text was updated successfully, but these errors were encountered: