requirements class addded, todo: get pwd order nr
This commit is contained in:
@@ -9,16 +9,37 @@
|
||||
using System;
|
||||
using System.Collections.Concurrent;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Net.Http;
|
||||
using static Xylem.Common.Service.MeterProcessState.Controllers.OldPasswordController;
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
var client = new SIRTClient("COM6");
|
||||
|
||||
client.OpenConnection();
|
||||
Console.ReadKey();
|
||||
client.CloseConnection();
|
||||
ServicePointManager.ServerCertificateValidationCallback += (sender, certificate, chain, sslPolicyErrors) =>
|
||||
{
|
||||
return true;
|
||||
};
|
||||
// $"https://nodes.sms-esaap.com:8081/api/v3/custom/keysetkeys?orderNumber=3229547&radioAdress=241630563"
|
||||
using (var request = new HttpRequestMessage(HttpMethod.Put, $"https://nodes.sms-esaap.com:8081/api/v3/custom/keysetkeys?orderNumber=3229547&radioAdress=241630563"))
|
||||
{
|
||||
request.Headers.Add("Cache-Control", "no-cache");
|
||||
request.Headers.Add("X-Node-Token", "d5b8c0b2-81f6-4421-80d0-44eb2093e616");
|
||||
|
||||
using (var response = new HttpClient().SendAsync(request).Result)
|
||||
{
|
||||
var content = response.Content.ReadAsStringAsync().Result;
|
||||
var x = MeterPw.FromJson(content);
|
||||
}
|
||||
}
|
||||
|
||||
//var client = new SIRTClient("COM6");
|
||||
|
||||
//client.OpenConnection();
|
||||
//Console.ReadKey();
|
||||
//client.CloseConnection();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user