Skip to content
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

Open
therve opened this issue Dec 20, 2021 · 3 comments
Open

Support for binary requests in persister #442

therve opened this issue Dec 20, 2021 · 3 comments

Comments

@therve
Copy link

therve commented Dec 20, 2021

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 in postData. 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

this.postData.text = request.body;

@offirgolan
Copy link
Collaborator

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?

@therve
Copy link
Author

therve commented Feb 7, 2022

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.

@offirgolan
Copy link
Collaborator

offirgolan commented Feb 7, 2022

Would setting the recordIfMissing config to false solve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants