Skip to content
This repository has been archived by the owner on Sep 25, 2023. It is now read-only.

Support binary responses with andReturn #40

Open
mjones-vsat opened this issue Aug 19, 2019 · 3 comments
Open

Support binary responses with andReturn #40

mjones-vsat opened this issue Aug 19, 2019 · 3 comments

Comments

@mjones-vsat
Copy link

Right now binary responses don't seem to work as intended due to extensive use of String. What would it take to allow binary responses to be mocked?

@rohanKanojia
Copy link
Member

Umm, Could you please elaborate your use case a bit?

@mjones-vsat
Copy link
Author

We are using protobuf instead of JSON, and the following doesn't work:

message = getProtoMessage();
server.expect().withPath("/api/foo").andReturn(200, message.toByteArray()).once();

@rohanKanojia
Copy link
Member

@vsmteam : Could you please raise a PR to support this?

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

No branches or pull requests

2 participants