// 2022-02-15 -> FileRead
This commit is contained in:
@ -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())
|
||||
{
|
||||
|
Reference in New Issue
Block a user