38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
namespace LaaProduction.Console
|
|
{
|
|
using System;
|
|
using System.Net.Http;
|
|
using System.Web;
|
|
|
|
public class Program
|
|
{
|
|
public static void Main(String[] args)
|
|
{
|
|
GetKitronProductionDate();
|
|
}
|
|
|
|
private static DateTime GetKitronProductionDate()
|
|
{
|
|
var requestURIBuilder = new UriBuilder("http://10.49.40.25");
|
|
requestURIBuilder.Path = "/MeterProcessState/api/FinalCheck/GetKitronProductionDate";
|
|
requestURIBuilder.Query = $"CheckPcbId=241610009";
|
|
|
|
using (var httpClient = new HttpClient())
|
|
{
|
|
using (var httpRequestMessage = new HttpRequestMessage())
|
|
{
|
|
httpRequestMessage.Method = HttpMethod.Get;
|
|
httpRequestMessage.RequestUri = requestURIBuilder.Uri;
|
|
|
|
using (var httpResponseMessage = httpClient.SendAsync(httpRequestMessage).Result)
|
|
{
|
|
var content = httpResponseMessage.Content.ReadAsStringAsync().Result;
|
|
}
|
|
}
|
|
}
|
|
|
|
return DateTime.Now;
|
|
}
|
|
}
|
|
}
|