How to retrieve response trailers in grpc-web calls

25 views
Skip to first unread message

Rob Cecil

unread,
Jan 22, 2021, 1:40:27 PM1/22/21
to grpc.io
Hi, I'm using the generated js code that uses Promises along with TS.

Example method:

  getMenu(
    request: Menu_pb.GetMenuRequest,
    metadata?: grpcWeb.Metadata
  ): Promise<Menu_pb.Menu>;

I have been passing in the deadline via Metadata in the last argument of the generated methods.

How do I interrogate the response trailers using the Promise API ?

Thanks

Rob Cecil

unread,
Jan 22, 2021, 5:28:04 PM1/22/21
to grpc.io
Ha, I found an answer:

https://github.com/grpc/grpc-web/issues/721

Be nice if these sort of details were pulled out issues into the main documentation.

Reply all
Reply to author
Forward
0 new messages