21 lines
556 B
C#
21 lines
556 B
C#
using System.Net.Http.Json;
|
|
using TIAMWebApp.Shared.Application.Interfaces;
|
|
using TIAMWebApp.Shared.Application.Models;
|
|
|
|
namespace TIAMMobileApp.Services
|
|
{
|
|
public class WeatherForecastService : IWeatherForecastService
|
|
{
|
|
private readonly HttpClient http;
|
|
|
|
public WeatherForecastService(HttpClient http)
|
|
{
|
|
this.http = http;
|
|
}
|
|
public Task<WeatherForecast[]?> GetWeatherForecastAsync()
|
|
{
|
|
return http.GetFromJsonAsync<WeatherForecast[]>("WeatherForecastAPI");
|
|
}
|
|
}
|
|
}
|