namespace eSuite.API.SingleSignOn;

/// <summary>
/// 
/// </summary>
public class HttpClientFacade : IHttpClientFacade
{
    private readonly HttpClient _httpClient = new();

    /// <summary>
    /// 
    /// </summary>
    /// <param name="request"></param>
    /// <param name="cancellationToken"></param>
    /// <returns></returns>
    public async Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
    {
        return await _httpClient.SendAsync(request, cancellationToken);
    }

    /// <summary>
    /// 
    /// </summary>
    /// <param name="uri"></param>
    /// <param name="cancellationToken"></param>
    /// <returns></returns>
    public async Task<string> GetStringAsync(Uri uri, CancellationToken cancellationToken)
    {
        return await _httpClient.GetStringAsync(uri, cancellationToken);
    }
}