Pure JS gRPC encode/decode helpers for well-known iOS network tools.
Decode the existing raw gRPC binary frame used by this package and return protobuf body bytes.
Encode protobuf body bytes into the existing raw gRPC binary frame used by this package.
Decode a grpc-web binary unary response body and return:
{
header: {
"grpc-status": "0"
},
bodyBytes: Uint8Array
}header contains the key-value pairs parsed from the grpc-web trailer frame. bodyBytes contains the protobuf payload after optional gzip decompression.
decodeWebonly supports grpc-web binary unary responses.decodeWebdoes not support grpc-web-text.decodeWebtreats trailer metadata from the body trailer frame asheader; it does not parse transport-level HTTP response headers.