Sidecar application used by Confluent for VS Code, as a local proxy for Confluent Cloud, Confluent Platform and local Kafka clusters, to help users build streaming applications.
Apache License 2.0
3
stars
3
forks
source link
Return base64 encoded bytes under `__raw__` in Consume API responses #117
With the way the sidecar consume API is implemented today, the VS Code message viewer and the user do not have a way to determine whether the key/value data returned by the sidecar Consume API is either (a) a string representation of a string literal "i am a teapot", or (b) a string representation of the base64 encoded version of some raw bytes "aSBhbSBub3QgYSB0ZWFwb3QK" (decodes to "i am not a teapot").
The CCloud API handles this by sending the base64 encoded data in the __raw__ field of the response. We need to consider implementing this for the sidecar Consume API as well.
With the way the sidecar consume API is implemented today, the VS Code message viewer and the user do not have a way to determine whether the key/value data returned by the sidecar Consume API is either (a) a string representation of a string literal
"i am a teapot"
, or (b) a string representation of the base64 encoded version of some raw bytes"aSBhbSBub3QgYSB0ZWFwb3QK"
(decodes to "i am not a teapot").The CCloud API handles this by sending the base64 encoded data in the
__raw__
field of the response. We need to consider implementing this for the sidecar Consume API as well.