- Hinzugefügt: `BaseHttpClientService` zur Handhabung von HTTP-Anfragen mit Cookie-Verwaltung. - Implementiert: `HttpClientService<TClientOptions>`, das `BaseHttpClientService` für typisierte Client-Optionen erweitert. - Erstellt: `DIExtensions` zur Registrierung von HTTP-Client-Diensten im Dependency Injection Container. - Bereitgestellt: Methoden zum Hinzufügen von HTTP-Client-Diensten mit und ohne spezifische Client-Optionen. - Konfiguriert: Optionen zum Festlegen der Basis-URI für HTTP-Clients.
14 lines
534 B
C#
14 lines
534 B
C#
using DigitalData.Core.Abstractions.Client;
|
|
using Microsoft.Extensions.Options;
|
|
using System.Net;
|
|
|
|
namespace DigitalData.Core.Client
|
|
{
|
|
public class HttpClientService<TClientOptions> : BaseHttpClientService, IHttpClientService<TClientOptions>, IBaseHttpClientService
|
|
where TClientOptions : HttpClientOptions, new()
|
|
{
|
|
public HttpClientService(HttpClient client, CookieContainer cookieContainer, IOptions<TClientOptions> clientOptions) : base(client, cookieContainer, clientOptions)
|
|
{
|
|
}
|
|
}
|
|
} |