-
Notifications
You must be signed in to change notification settings - Fork 350
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
Support for binary requests in persister #442
Comments
As of right now, we don't support it mostly due to the fact that we don't need the post data when replaying recordings. Is there a specific use case you have for needing this? |
Yeah I want my test run to fail if the payload has changed and there is no recording matching. I can do that with JSON payloads today, but not compressed payloads. |
Would setting the recordIfMissing config to |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
Currently when we send binary requests (in our cases, JSON compressed payloads), the persister doesn't record anything. The core of the issue is that HAR doesn't really support it, given that it only has a
text
property inpostData
. I believe it can be worked around by using hex/base64, and find a way to mark the payload binary (maybe just add a _isBinary field? Or additional data in the mime type?).Relevant Links
pollyjs/packages/@pollyjs/persister/src/har/request.js
Line 43 in 18262cf
The text was updated successfully, but these errors were encountered: