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 bytes as response type #241

Closed
stefanello8 opened this issue Jul 2, 2021 · 2 comments · Fixed by #281
Closed

Support bytes as response type #241

stefanello8 opened this issue Jul 2, 2021 · 2 comments · Fixed by #281

Comments

@stefanello8
Copy link

I have a Consumer that expects bytes as response. Something like this:
.will_respond_with(200, body=bytes([0x13, 0x00, 0x00, 0x00, 0x08, 0x00]))

But it seems like bytes are not supported as response type of an interaction, since I'm getting a value error from pact (ValueError: Unknown type: <class 'bytes'>).

Is it possible to support bytes as well or is there any workaround for this kind of scenario?

@joshua-badger
Copy link
Contributor

I also have a situation this would be helpful for. I'd love to see this happen.

@joshua-badger
Copy link
Contributor

This issue has not actually been solved yet, the fix applied was naive in a few assumptions.

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

Successfully merging a pull request may close this issue.

2 participants