16 lines
496 B
C#
Executable File
16 lines
496 B
C#
Executable File
using Microsoft.Extensions.DependencyInjection;
|
|
using Microsoft.Extensions.DependencyInjection.Extensions;
|
|
|
|
namespace Opsoft.NetCore.O3App.Infrastructure
|
|
{
|
|
public static class CustomHttpClientExtensions
|
|
{
|
|
public static IServiceCollection AddCustomHttpClient(this IServiceCollection services)
|
|
{
|
|
services.TryAddTransient(typeof(FormHttpClient<>));
|
|
services.TryAddTransient(typeof(JsonHttpClient<>));
|
|
return services;
|
|
}
|
|
}
|
|
}
|