using System.Net.Http; using System.Net.Http.Json; using System.Threading.Tasks; using antblazorpro.Models; namespace antblazorpro.Services { public interface IUserService { Task GetCurrentUserAsync(); } public class UserService : IUserService { private readonly HttpClient _httpClient; public UserService(HttpClient httpClient) { _httpClient = httpClient; } public async Task GetCurrentUserAsync() { return await _httpClient.GetFromJsonAsync("data/current_user.json"); } } }