Just looking at this again, and it is quite straightforward of course:
public override AsyncServerStreamingCall<TResponse> AsyncServerStreamingCall<TRequest, TResponse>(TRequest request, ClientInterceptorContext<TRequest, TResponse> context, AsyncServerStreamingCallContinuation<TRequest, TResponse> continuation)
{
context.Options.Headers.Add(CreateBearerTokenHeader("..."));
return continuation(request, context);
}
Just need to figure out how to catch a 401 response, refresh the token and retry....
I've seen
this one, but it would be great to have a few more examples of interceptor usage, particularly with streaming responses. Does anybody know of something?