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

Binary data in body? #42

Closed
kornelski opened this issue Sep 12, 2018 · 0 comments
Closed

Binary data in body? #42

kornelski opened this issue Sep 12, 2018 · 0 comments

Comments

@kornelski
Copy link
Contributor

kornelski commented Sep 12, 2018

I'd like to test responses with binary data (images), but mockito seems to assume the body is UTF-8-encoded string.

Could you change .with_body to accept AsRef<[u8]> and store the body as Vec<u8>? This should make it work for both strings and binary data.

kornelski added a commit to kornelski/mockito that referenced this issue Sep 12, 2018
lipanski pushed a commit that referenced this issue Sep 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant