Home > Net >  Http get Influxdb content analytical problems
Http get Influxdb content analytical problems

Time:09-26

C # write a Http get temporal database content in a table, the main code
Public static string Get (string uri, string username, string password)
{
The string result=string. The Empty;

WebClient client=new WebClient ();

if (! String. IsNullOrEmpty (username) & amp; & ! String. IsNullOrEmpty (password))
{
Client. The Credentials=GetCredentialCache (uri, username, password);
Client. Headers. The Add (" Authorization ", GetAuthorization (username, password));
}
Return client. DownloadString (uri);
}

Call the result returns a string
{" results ": [{" statement_id" : 0, "series" : [{" name ":" currentConnections ", "columns" :/"time", "value", "values" : [[2019-12-19 T08:01:54 Z, 10]]}]}]}
This is a great god please standard json string format? How to convert the Model class?
This is a database query content

  •  Tags:  
  • C#
  • Related