-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Issue with converting to the bytes data type #1781
Comments
I am having the same issue as well |
If you want to receive a |
What is about It would be very nice if there is a type which can receive raw binary data as body, and all according metadata via headers ( Browsers of today can send real binary data ( This would reduce the transferred data size by 33%. I refer to HttpBody, because this type is only usable as a "root" response type in a transcoded context, why not bidirectional? |
Seems reasonable to add support for unmarshaling a HTTPBody as raw data. I expect you probably would just update the definition in https://github.com/grpc-ecosystem/grpc-gateway/blob/main/runtime/marshal_httpbodyproto.go. Could you create a separate issue though? |
🐛 Bug Report
There is an issue with using a Javascript byte array as the protobuf type
bytes
.This is the code used to create the byte array
To Reproduce
bytes
input field in the request message.Uint8Array
.Expected behavior
Request should succeed.
This rpc function succeeds when using a Go gRPC client +
[]byte
as the input field. Thus, I suspect the issue is somewhere before the request reaches the rpc function (in the area handled by grpc-gateway)Actual Behavior
Your Environment
OSX
Go 1.14.2
github.com/grpc-ecosystem/grpc-gateway/v2 v2.0.1
The text was updated successfully, but these errors were encountered: