feat(esppApi): метод FindOrdersAsync поиска нарядов в АСУ ЕСПП по свойствам

This commit is contained in:
Mikhail Kuznetsov
2023-10-24 12:10:19 +10:00
parent 57a72cfd9f
commit 4d30de36f5
12 changed files with 163 additions and 48 deletions

View File

@@ -1,6 +1,5 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using PARR.EsppApi.Services;
using PARR.EsppApi.Settings;
namespace PARR.EsppApi
@@ -17,8 +16,12 @@ namespace PARR.EsppApi
services.AddTransient<IEsppApiService, EsppApiService>();
services.AddHttpClient<Espp>();
//add other services
services.AddHttpClient<EsppHttpService>(client =>
{
client.BaseAddress = new Uri(esppSettings.Url);
client.DefaultRequestHeaders.Add("EsppUser", esppSettings.UserName);
client.DefaultRequestHeaders.Add("EsppPassword", esppSettings.Password);
});
}
}