EncodeBinaryHeader base64-encodes the data. It always emits unpadded values. In the Connect, gRPC, and gRPC-Web protocols, binary headers must have keys ending in "-Bin".
(data []byte)
| 50 | // In the Connect, gRPC, and gRPC-Web protocols, binary headers must have keys |
| 51 | // ending in "-Bin". |
| 52 | func EncodeBinaryHeader(data []byte) string { |
| 53 | // gRPC specification says that implementations should emit unpadded values. |
| 54 | return base64.RawStdEncoding.EncodeToString(data) |
| 55 | } |
| 56 | |
| 57 | // DecodeBinaryHeader base64-decodes the data. It can decode padded or unpadded |
| 58 | // values. Following usual HTTP semantics, multiple base64-encoded values may |
no outgoing calls