diff --git a/src/ReC.Client/DependencyInjection.cs b/src/ReC.Client/DependencyInjection.cs index aa1ddd5..d747007 100644 --- a/src/ReC.Client/DependencyInjection.cs +++ b/src/ReC.Client/DependencyInjection.cs @@ -19,6 +19,7 @@ namespace ReC.Client /// An that can be used to configure the client. public static IHttpClientBuilder AddRecClient(this IServiceCollection services, string apiUri) { + services.AddScoped(); return services.AddHttpClient(ReCClient.ClientName, client => { client.BaseAddress = new Uri(apiUri); @@ -33,6 +34,7 @@ namespace ReC.Client /// An that can be used to configure the client. public static IHttpClientBuilder AddRecClient(this IServiceCollection services, Action configureClient) { + services.AddScoped(); return services.AddHttpClient(ReCClient.ClientName, configureClient); } } diff --git a/src/ReC.Client/ReC.Client.csproj b/src/ReC.Client/ReC.Client.csproj index ea6f807..db8b30f 100644 --- a/src/ReC.Client/ReC.Client.csproj +++ b/src/ReC.Client/ReC.Client.csproj @@ -11,6 +11,7 @@ +