-
Notifications
You must be signed in to change notification settings - Fork 1
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
How to use decodeGrpcWebBody #11
Comments
Since your string appears to be base64 encoded your second attempt looks more promising to me. How did you get the body string in the first place? The error |
In my case i read the body of the request (this contains the string i shared) that is the one that grpc-web send for the requests. I think the problem is that i am trying to decode any |
Yea so if your body message is of the expected format, you will get a GrpcResponse type back This contains the message which itself is a bytearray that you would use one of your protobuf messages to decode. So to clarify Are you using playwright though? I wouldn't expect direct usage of |
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 decodeBut i get the following error:
throw new Error("Unrecognised status code [".concat(status, "]"));
I tried:
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
The text was updated successfully, but these errors were encountered: