24 lines
521 B
C#
24 lines
521 B
C#
using System.Net.Http.Json;
|
|
using TIAMWebApp.Shared.Application.Interfaces;
|
|
using TIAMWebApp.Shared.Application.Models;
|
|
|
|
namespace TIAMMobileApp.Services
|
|
{
|
|
public class SupplierService : ISupplierService
|
|
{
|
|
private readonly HttpClient http;
|
|
|
|
public SupplierService(HttpClient http)
|
|
{
|
|
this.http = http;
|
|
}
|
|
|
|
|
|
Task<Supplier[]?> ISupplierService.GetSuppliersAsync()
|
|
{
|
|
return http.GetFromJsonAsync<Supplier[]>("SupplierAPI");
|
|
}
|
|
}
|
|
}
|
|
|