Bluehouse-Technology / grpc

Erlang library for GRPC
Apache License 2.0
100 stars 38 forks source link

Hardcoded headers/metadata #3

Closed cabol closed 7 years ago

cabol commented 7 years ago

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:

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!!

willemdj commented 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

willemdj commented 7 years ago

This is solved now, using the pull request and some additional things.