Support Uint8Array / Buffer in api.stream* endpoints #2354
lilWolf011
started this conversation in
Suggestions
Replies: 3 comments
|
+1 please, this would be amazing! |
0 replies
|
+1 |
0 replies
|
+1 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
🚀 Feature Request: Native Binary Support Across All APIs
Hi Encore team 👋,
I’m a happy Encore user working with both standard APIs and streaming APIs (
api.streamInOut, etc.). Currently, Encore APIs only support JSON-compatible types (string,number,boolean,object), which limits binary use cases across the board.For example, this is not supported:
This limitation applies not only to streaming APIs but to all Encore endpoints, which creates unnecessary friction when working with binary data.
🧩 Problem
Because
Uint8ArrayorBufferaren't supported in any endpoint type, we are forced tobase64-encodebinary payloads when sending data between client and server.This results in:
✅ Proposed Solution
Add native support for
Uint8Array(orBuffer) across all API definitions, including both standard and streaming endpoints:This would enable efficient binary transport using formats like
msgpack,Protobuf, or similar — without requiring manual encoding.🎯 Benefits
🙏 Summary
Would love to see this in the roadmap — I’d be happy to help test or prototype if needed. Thanks again for the amazing work on Encore!
All reactions