private static AuthenticatingHttpClientHandler CreateClientHandler(string user, string password, ClientConfiguration config) { var handler = new AuthenticatingHttpClientHandler(user, password); #if NET45 handler.ServerCertificateValidationCallback = OnCertificateValidation; #else try { handler.ServerCertificateCustomValidationCallback = OnCertificateValidation; } catch (NotImplementedException) { Log.Debug("Cannot set ServerCertificateCustomValidationCallback, not supported on this platform"); } if (config != null) { handler.MaxConnectionsPerServer = config.DefaultConnectionLimit; } #endif return handler; }
internal CouchbaseHttpClient(AuthenticatingHttpClientHandler handler) : base(handler) { }