feat(IEConnectClient): create interface to handle abse http client operations
This commit is contained in:
11
src/Leanetec.EConnect.Client/Interface/IEConnectClient.cs
Normal file
11
src/Leanetec.EConnect.Client/Interface/IEConnectClient.cs
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
using Leanetec.EConnect.Domain.Entities;
|
||||||
|
|
||||||
|
namespace Leanetec.EConnect.Client.Interface;
|
||||||
|
|
||||||
|
public interface IEConnectClient<TError> where TError : class
|
||||||
|
{
|
||||||
|
public Task<Response<TData, TError>> GetAsync<TData>(string? route, CancellationToken cancel = default) where TData : class;
|
||||||
|
|
||||||
|
public Task<Response<IAsyncEnumerable<TData?>, TError>> GetListAsAsyncEnumerable<TData>(string? route, CancellationToken cancel = default)
|
||||||
|
where TData : class;
|
||||||
|
}
|
||||||
@@ -11,4 +11,8 @@
|
|||||||
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.1" />
|
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.1" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Leanetec.EConnect.Domain\Leanetec.EConnect.Domain.csproj" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Reference in New Issue
Block a user