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); }
public GrpcClientHandler(IAuthenticationSurface authenticationSurface) { AuthenticationSurface = authenticationSurface; Log.Trace("Enabling DangerousAcceptAnyServerCertificateValidator"); ServerCertificateCustomValidationCallback = DangerousAcceptAnyServerCertificateValidator; }