grpcbox icon indicating copy to clipboard operation
grpcbox copied to clipboard

Unable to override client `content-type`

Open dbhobbs opened this issue 3 years ago • 3 comments

I'm attempting to use the gRPC API for Google Cloud PubSub but I continue to receive a 404 http_error. I think this is similar to this issue in the elixir-grpc library. The *.googleapis.com services expect a Content-Type of application/grpc and anything else results in a 404 Not Found.

I've tried setting the content-type in the metadata via an interceptor, but I believe it's being overridden by the default provided here.

dbhobbs avatar Nov 09 '21 21:11 dbhobbs

Can ask google support or someone at google? That would mean Google is not following their own spec :) I wouldn't doubt it to be the case, but would expect them to fix it.

tsloughter avatar Nov 09 '21 21:11 tsloughter

But it would be acceptable to have the user supplied metadata take precedence over those static headers if you can send a PR.

tsloughter avatar Nov 09 '21 21:11 tsloughter

Just confirmed that dropping the +proto solved the 404 http_error. It is quite silly and frustrating that it works like this, but alas, I'll work on getting a PR put together that allows user supplied metadata to override defaults.

dbhobbs avatar Nov 10 '21 00:11 dbhobbs