Skip to content

How to use decodeGrpcWebBody #11

Description

@ivan-rodriguez-ag

Hi,

I am building mock server with express and i am using your library to serialize and deserialize proto objects but now i am facing a problem to deserialize the request body of a proto in the express server.

My idea Is to read the body string (something like this AAAAAAMKATE=) and use your function to decode

decodeGrpcWebBody(Buffer.from('AAAAAAMKATE='))

But i get the following error: throw new Error("Unrecognised status code [".concat(status, "]"));

I tried:

decodeGrpcWebBody(Buffer.from('AAAAAAMKATE=', 'base64'));

but in this case i had the error: throw new Error("Expected trailers header 0x80");

Is it right to get the string and generate a buffer from the string? Should i read the express body as buffer?

I am completely lost about what is happening here, i don't know if you have some clue

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions