GetCookies-Methode hinzugefügt. Test für http-Dienst hinzugefügt
This commit is contained in:
@@ -17,7 +17,7 @@ namespace DigitalData.Core.Client
|
||||
return services;
|
||||
}
|
||||
|
||||
public static IServiceCollection AddHttpClientService<TClientOptions>(this IServiceCollection services, Action<TClientOptions>? clientOptions = null, bool setAsDefault = false)
|
||||
public static IServiceCollection AddHttpClientService<TClientOptions>(this IServiceCollection services, Action<TClientOptions>? clientOptions = null, bool setAsDefaultBase = false)
|
||||
where TClientOptions : HttpClientOptions, new()
|
||||
{
|
||||
services.TryAddSingleton<HttpClient>();
|
||||
@@ -25,7 +25,7 @@ namespace DigitalData.Core.Client
|
||||
services.AddSingleton<IHttpClientService<TClientOptions>, HttpClientService<TClientOptions>>();
|
||||
services.Configure(clientOptions ?? (_ => { }));
|
||||
|
||||
if (setAsDefault)
|
||||
if (setAsDefaultBase)
|
||||
services.AddSingleton<IBaseHttpClientService, HttpClientService<TClientOptions>>();
|
||||
|
||||
return services;
|
||||
|
||||
Reference in New Issue
Block a user