requirements class addded, todo: get pwd order nr

This commit is contained in:
Stoyan Zlatev
2025-01-10 14:57:59 +01:00
parent 73c9fa90bc
commit 01c375b62e
5 changed files with 107 additions and 8 deletions
+25 -4
View File
@@ -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();
}
}