improbable-eng / ts-protoc-gen

Protocol Buffers Compiler (protoc) plugin for TypeScript and gRPC-Web.
Apache License 2.0
1.36k stars 173 forks source link

OnHeaders callback is not accessible. #291

Open singerxt opened 2 years ago

singerxt commented 2 years ago

Versions of relevant software used 0.15 What happened Response headers are not accessible from the client because the header's callback is not exposed.

What you expected to happen

I should be able to have onHeaders callback provided by _grpcweb library.

const response = client.listFiles(req, headers);
response.on('headers', (headers) => {
  console.log(headers);
});

How to reproduce it (as minimally and precisely as possible):


const response = client.listFiles(req, headers);
response.on('headers', (headers) => {
  console.log(headers);
});

will throw an unexpected errors.
singerxt commented 2 years ago

I'm more than happy to fix it. However, I'm not sure if this repository is alive.

?

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.