Closed cabol closed 7 years ago
Hi Carlos, you are right, this needs to be fixed.
It makes sense to do a merge as you suggest. If you can make a pull request from your fix, then I will use that as a basis. I'll then add something to get the correct values for :scheme and :authority.
Thakns, Willem
This is solved now, using the pull request and some additional things.
There are headers that shouldn't be hard coded, because of this is not possible to consume external gRPC APIs, for example Google Services (in my case Spanner).
These are some of them:
:scheme
- https://github.com/Bluehouse-Technology/grpc/blob/master/src/grpc_client_lib.erl#L156 - This one should be obtained from the connection scheme.:authority
- https://github.com/Bluehouse-Technology/grpc/blob/master/src/grpc_client_lib.erl#L158 - This one may be obtained from the Host.Don't know if make sense but other solution (which could be useful for some cases) might be allowing headers overriding the headers, using the metadata (merge both proplists instead of append them - https://github.com/Bluehouse-Technology/grpc/blob/master/src/grpc_client_lib.erl#155) – this was the workaround I did to make it work against Google, but not sure if it is the right way.
Stay tuned! Thanks!!