make httpclient public

This commit is contained in:
Pilzinsel64
2024-12-17 14:40:24 +01:00
parent e369497537
commit 7c6b30aa7b
2 changed files with 3 additions and 6 deletions

View File

@@ -5,9 +5,10 @@ namespace Pilz.Net.Api;
public class ApiClient(string apiUrl) : IApiClient
{
protected readonly HttpClient httpClient = new();
protected readonly List<object> clients = [];
public HttpClient HttpClient { get; set; } = new();
public virtual string ApiUrl { get; } = apiUrl;
public string? AuthKey { get; set; }
@@ -84,7 +85,7 @@ public class ApiClient(string apiUrl) : IApiClient
Content = content
};
return await httpClient.SendAsync(httpmsg);
return await HttpClient.SendAsync(httpmsg);
}
protected virtual string BuildParameters(ApiParameterCollection? @params)

View File

@@ -1,14 +1,10 @@
using Castle.Core.Logging;
using Newtonsoft.Json.Linq;
using Pilz.Extensions.Reflection;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Net;
using System.Reflection;
using System.Text.Encodings.Web;
using System.Text.RegularExpressions;
using System.Web;
using System.Xml;
using static Pilz.Net.Api.IApiServer;
namespace Pilz.Net.Api;