// 2022-02-15 -> FileRead

This commit is contained in:
2022-02-15 09:53:11 -07:00
parent 8ef7fca67a
commit 7fab3b7c1f
5 changed files with 429 additions and 457 deletions

View File

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Linq;
using System.Text;
using System.Text.Json;
@ -9,8 +10,6 @@ namespace Adaptation.Shared.Metrology;
public partial class WS
{
#pragma warning disable CA1847
public static Tuple<string, Results> SendData(string url, object payload, int timeoutSeconds = 120)
{
Results results = new();
@ -18,7 +17,7 @@ public partial class WS
try
{
string json = JsonSerializer.Serialize(payload, payload.GetType());
if (string.IsNullOrEmpty(url) || !url.Contains(":") || !url.Contains("."))
if (string.IsNullOrEmpty(url) || !url.Contains(':') || !url.Contains('.'))
throw new Exception("Invalid URL");
using (HttpClient httpClient = new())
{