HTTP headers to gRPC metadata

1,652 views
Skip to first unread message

Vito Tumas

unread,
Dec 20, 2016, 7:01:08 AM12/20/16
to Google Cloud Endpoints
Hello,


I've configured Google Endpoints to work with a gRPC server. The configuration allows users to make HTTP and gRPC requests.

However, when making an HTTP request, I want to pass some headers to the server, is there a way to do this?

I tried adding Grpc-metadata-<key>: <value> header, and Metadata-<key>: <value> header, but neither seem to get passed to the metadata.


Thanks,

Vito



Lizan Zhou

unread,
Dec 21, 2016, 11:14:22 PM12/21/16
to Google Cloud Endpoints
Hi Vito,

The metadata in gRPC is essentially just an HTTP header, just adding "<key>: <value>" should passed to gRPC server as metadata. Note in the gRPC, metadata key is always converted to lowercase.

I will verify again and get back to you later.

Best,
Lizan
Reply all
Reply to author
Forward
0 new messages