public static HttpClient Create(Uri baseAddress, IAuthenticationSurface authenticationSurface)
        {
            var webHandler = new GrpcWebHandler(GrpcWebMode.GrpcWebText, new GrpcClientHandler(authenticationSurface));
            var httpClient = new HttpClient(webHandler, true);

            httpClient.BaseAddress = baseAddress;
            return(httpClient);
        }
Beispiel #2
0
 public GrpcClientHandler(IAuthenticationSurface authenticationSurface)
 {
     AuthenticationSurface = authenticationSurface;
     Log.Trace("Enabling DangerousAcceptAnyServerCertificateValidator");
     ServerCertificateCustomValidationCallback = DangerousAcceptAnyServerCertificateValidator;
 }