feat: Implementierung von BaseHttpClientService und DIExtensions für HTTP-Client-Dienste
- 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.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
namespace DigitalData.Core.Abstractions.Client
|
||||
{
|
||||
public interface IBaseHttpClientService
|
||||
{
|
||||
public string Uri { get; init; }
|
||||
|
||||
Task<HttpResponseMessage> FetchAsync(
|
||||
string route = "",
|
||||
HttpMethod? method = null,
|
||||
HttpContent? body = null,
|
||||
Dictionary<string, string>? form = null,
|
||||
bool sendWithCookie = true,
|
||||
bool saveCookie = true
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user