AdysTech.InfluxDB.Client.Net.InfluxDBClient.InfluxDBClient C# (CSharp) Метод

InfluxDBClient() публичный Метод

Creates the InfluxDB Client
public InfluxDBClient ( string InfluxUrl, string UserName, string Password ) : System
InfluxUrl string Url for the Inflex Server, e.g. http://localhost:8086
UserName string User name to authenticate InflexDB
Password string password
Результат System
        public InfluxDBClient (string InfluxUrl, string UserName, string Password)
        {
            this._influxUrl = InfluxUrl;
            this._influxDBUserName = UserName;
            this._influxDBPassword = Password;

            _client = new HttpClient ();
            if (!(String.IsNullOrWhiteSpace (InfluxDBUserName) && String.IsNullOrWhiteSpace (InfluxDBPassword)))
                _client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue ("Basic",
                    Convert.ToBase64String (System.Text.ASCIIEncoding.ASCII.GetBytes ($"{InfluxDBUserName}:{InfluxDBPassword}")));
            _client.DefaultRequestHeaders.ConnectionClose = false;
        }

Same methods

InfluxDBClient::InfluxDBClient ( string InfluxUrl ) : System