diff --git a/Main/ApiClient.cs b/Main/ApiClient.cs
index 8c48cc5..e33e72e 100644
--- a/Main/ApiClient.cs
+++ b/Main/ApiClient.cs
@@ -22,15 +22,15 @@ namespace Wrapper_Api_SequentMicrosystems.Main
/// Error message
public async Task GetData(string Endpoint)
{
- HttpResponseMessage response = await _httpClient.GetAsync(Endpoint);
+ string response = await _httpClient.GetStringAsync(Endpoint);
- if (response.IsSuccessStatusCode)
+ try
{
- return JsonConvert.DeserializeObject(await response.Content.ReadAsStringAsync());
+ return JsonConvert.DeserializeObject(response);//await response.Content.ReadAsStringAsync());
}
- else
+ catch (Exception ex) { }
{
- throw new Exception(response.EnsureSuccessStatusCode().Content.ToString());
+ throw new Exception("GetData deserialize error");
}
}
diff --git a/RTD8TM/RTD8TM.cs b/RTD8TM/RTD8TM.cs
index b1cb7f8..178ab8b 100644
--- a/RTD8TM/RTD8TM.cs
+++ b/RTD8TM/RTD8TM.cs
@@ -31,14 +31,14 @@ namespace Wrapper_Api_SequentMicrosystems.RTD8TM
/// Deserialized data from API
public async Task> Get(string address)
{
- try
- {
+ //try
+ //{
return await _client.GetData>($"{address}api/RTDDA");
- }
- catch //(Exception ex)
- {
- return new();
- }
+ //}
+ //catch (Exception ex)
+ //{
+ // throw new Exception(ex.Message);
+ //}
}
///