您好,欢迎来到平阳县妙观科技有限公司官方网站!主营温湿度记录仪温湿度变送器新款蓝牙版TH20BL火热畅销中!电联18601064199.

4代TH4XW/TH4XG 调用易维联云平台api的C# demo

var httpWebRequest = (HttpWebRequest)WebRequest.Create("http://www.1weilian.com:8750/mtInterface/realTime/getRealTime");

httpWebRequest.ContentType = "application/json";

httpWebRequest.Method = "POST";


using (var streamWriter = new StreamWriter(httpWebRequest.GetRequestStream()))

{

    string json = "{\"clientId\":\"66675e88c7c64bea91f649e04xxxxxx\"," +

"\"rows\":\"2\","+

                  "\"page\":\"0\"}";


    streamWriter.Write(json);

    streamWriter.Flush();

    streamWriter.Close();

}


var httpResponse = (HttpWebResponse)httpWebRequest.GetResponse();

using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))

{

    var result = streamReader.ReadToEnd();

}