Created
April 28, 2020 08:16
-
-
Save xtrmstep/4880a2ca0a9e37904f1daf1458c61a40 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| services.AddTransient<AuthHeadersInterceptor>(); | |
| services.AddHttpContextAccessor(); | |
| var httpClientBuilder = services.AddGrpcClient<MygRpcService.MygRpcServiceClient>(o => { o.Address = new Uri("grpc-endpoint-url"); }); | |
| httpClientBuilder.AddInterceptor<AuthHeadersInterceptor>(); | |
| httpClientBuilder.ConfigureChannel(o => o.Credentials = ChannelCredentials.Insecure); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment