Hi All,

I want to know what is the best way to add an auth header to every request
of the OKHttp client that GRPC is going to be using. This is something that
you can achieve in OKHttp using an Interceptor
<https://github.com/square/okhttp/wiki/Interceptors> and adding the
appropriate headers to your request.

I am trying to use the OkHttpChannelBuilder.forAddress method from GRCP but
I am not seeing a way of just adding an Interceptor to the OKHttp instance.
I saw that there is a similar concept using the intercept method but I am
still struggling to know where exactly do I need to add my auth header.
This task is pretty trivial using the vanilla OKHttp but I am not finding
any documentation or examples about doing this common use case for GRCP.

Hope someone can help me.

-- 
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 grpc-io+unsubscr...@googlegroups.com.
To post to this group, send email to grpc-io@googlegroups.com.
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/CADaGH89TiVt4RdjxWf8cB1CZrkh8rdvAGMAM2ZtH34-WO9-h1g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to