Question|Feature: Sending Binary Metadata #72
Comments
I forgot to mention, removing the binary metadata field results in a successful call. As a side note, flutter with gRPC is a dream so far! I'm rewriting an Android app that I gave up on after over a month, and within 2 days, I'm about 70% done with the same spec app using Flutter! |
Byte data in Dart is a Uint8List, yes. There's currently no special support for binary metadata, so with the current code, you'll need to base64-encode the data yourself. Something like: metadata: { 'testmetadata-bin': base64.encode(binaryData) } (where I'll keep this issue open to provide better support for binary metadata. |
+1. i need this too. Prefer not ot have to base64 it :) |
@gedw99 from my understanding, you can successfully send binary metadata, the library doesn't yet go the extra mile of checking whether a |
Ah. Not so bad..any chance you can link to an example of sniffing for this
from a dart function ?
…On Wed, May 9, 2018, 7:15 PM Neville Dipale ***@***.***> wrote:
@gedw99 <https://github.com/gedw99> from my understanding, you can
successfully send binary metadata, the library doesn't yet go the extra
mile of checking whether a *-bin contains binary data, but it shouldn't
stop us from using binary metadata.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#72 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ATuCwuGzKDHeXk6BSvIKbXUxc_eYeRkAks5twyQXgaJpZM4S56Vg>
.
|
Any new update regarding this? |
I am going to close this issue to reflect that no special work is planned here. There is nothing preventing you from sending binary metadata, you just need to base64 encode it manually. |
The grpc spec allows for sending
metadata-bin
as binary metadata. Is this currently supported?v0.4.0
Repro steps
Create a grpc-dart client to connect to a server
Create a client call including a binary metadata key with a text value
Expected result: The request should either throw an error about malformed
*-bin
metadata, or discard the metadataActual result: The request sends the metadata, but there's a failure on the server (tested with NodeJS and Java)
Details
The request seems to silently fail on both NodeJS and Java, I tried getting log output, but couldn't find anything. I use nghttpx as my proxy, and it passed the
testmetadata-bin
as I supplied it.One of the reasons why I use binary metadata is to pass my custom error messages as protobuf messages. I suppose it's a question for another day, but how would I deal with bytedata in dart? Do I use
Uint8List
?The text was updated successfully, but these errors were encountered: