compatibility with Improbable grpc-web library
Hello, i was wondering if you're going to add support for the Improbable grpc-web library https://github.com/improbable-eng/grpc-web
at the moment it doesn't seem to work,
Thank you.
This was specifically designed for use with the official version of grpc-web I think the improbable version uses different set of transports (fetch, websockets etc) so would be not have the same "hooks" as the official version. There is also thoughts on using the new Client Interceptor API to provide this, but again for it to work with improbable, it would have to have the same API.
If anyone is keen to research the possibilities, open to any PRs
Improbable supports interceptors as well as grpc-web by Google
Here is the code snippet to use interceptor with improbable :
function noopWrapTransport(t: Transport): Transport
{
return <Transport>{
cancel: t.cancel.bind(t),
finishSend: t.finishSend.bind(t),
sendMessage: t.sendMessage.bind(t),
start: t.start.bind(t)
};
}
new MyServiceClient(url,
<grpc.RpcOptions>{transport: options => noopWrapTransport(grpc.CrossBrowserHttpTransport({withCredentials: false})(options))}
);