headers are passed as gRPC metadata. So, on a stub call, there is an 
additional argument. A Python binding example:

response = stub.Predict(request, timeout=self.timeout, metadata=metadata)

metadata is a sequence of Tuples. For headers, the Tuple value at index 0 
is the HTTP header key and at index 1 is the HTTP header value.

Adrian


On Tuesday, 5 July 2022 at 10:03:17 UTC+1 Tejal Singh wrote:

> Hi
>
> I want to know how we can add custom http headers in a grpc call. I am 
> using feast serving service stub for making grpc call (from 
> feast.serving.ServingService_pb2_grpc import ServingServiceStub).
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/8edeb092-aabd-4348-950f-dde9b19caff5n%40googlegroups.com.

Reply via email to