💡 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:
interface BodyDecoder { // Converter?
fun decodeRequest(request: Request): String?
fun decodeResponse(response: Response): String?
}
Or maybe you do converter factories like retrofit 🤷
🙋 Do you want to develop this feature yourself?
💡 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/Responseand 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?