-
-
Notifications
You must be signed in to change notification settings - Fork 341
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
Improved handling of encoded/binary bodies #523
Comments
That's definitely and valuable extension point for Chucker 4.x |
I was thinking about it for some time as well. The thing I haven't figured out is how we could get correct type for a decoder. @mattprecious How would getting a concrete adapter look like for this interface? Retrofit relies on concrete types and reflection. We, unfortunately, don't have this information. Also most likely we wouldn't expose whole |
Yeah, decoding with proper names and type information wouldn't be straightforward. However, it is possible to decode a proto without that information. My ideas for the steps I would take to incorporate this into our app:
If we only receive the |
Ok, thanks for the feedback. Will think about it. And maybe I didn't make myself clear but I wouldn't expose only |
@cortinico so was it added as "extension point for Chucker 4.x"? |
Yup this is documented here https://github.com/ChuckerTeam/chucker#decode-body- |
💡 Describe the solution you'd like
It would be great if we could optionally provide a custom decoder to handle bodies that aren't plain text. We use protocol buffers, so I would like to be able to print something useful inside Chucker instead of
(encoded or binary body omitted)
.📊 Describe alternatives you've considered
None
📄 Additional context
An interface with a function that takes the
Request
/Response
and returns a string would probably be enough.Something like this, but with better naming:
Or maybe you do converter factories like retrofit 🤷
🙋 Do you want to develop this feature yourself?
The text was updated successfully, but these errors were encountered: