コード例 #1
0
        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);
        }
コード例 #2
0
 public GrpcClientHandler(IAuthenticationSurface authenticationSurface)
 {
     AuthenticationSurface = authenticationSurface;
     Log.Trace("Enabling DangerousAcceptAnyServerCertificateValidator");
     ServerCertificateCustomValidationCallback = DangerousAcceptAnyServerCertificateValidator;
 }