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

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

Posts raw write request to Influx.
public PostRawValueAsync ( string dbName, TimePrecision precision, string content ) : Task
dbName string Name of the Database
precision TimePrecision Unit of the timestamp, Hour->nanosecond
content string Raw request, as per Line Protocol
Результат Task
        public async Task<bool> PostRawValueAsync (string dbName, TimePrecision precision, string content)
        {
            ByteArrayContent requestContent = new ByteArrayContent (Encoding.UTF8.GetBytes (content));
            HttpResponseMessage response = await PostAsync (new Dictionary<string, string> () { { "db", dbName }, { "precision", precisionLiterals[(int) precision] } }, requestContent);

            if (response.StatusCode == HttpStatusCode.NoContent)
                return true;
            else
                return false;
        }