public async Task <T> GetResource <T>(string resourceUri) where T : IEmployerUsersResource { var absoluteUri = Combine(_configuration.ApiBaseUrl, resourceUri); var json = await _secureHttpClient.GetAsync(absoluteUri); return(JsonConvert.DeserializeObject <T>(json)); }
public async Task <PrivilegedAccessToken> GetPrivilegedAccessTokenAsync() { var absoluteUri = new Uri(new Uri(_configuration.ApiBaseUrl), "api/PrivilegedAccess"); var json = await _httpClient.GetAsync(absoluteUri.ToString()); return(JsonConvert.DeserializeObject <PrivilegedAccessToken>(json)); }
public Task Ping(CancellationToken cancellationToken = new CancellationToken()) { return(Task.WhenAll(_httpClient.GetAsync("ping", cancellationToken), _mediator.Send(new PingQuery(), cancellationToken))); }