btcpayserver/BTCPayServer.Client/BTCPayServerClient.Health.cs
Dennis Reimann 22e39998e2
Updates from code review
Thanks @kukks!
2020-04-21 16:43:14 +02:00

17 lines
481 B
C#

using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
using BTCPayServer.Client.Models;
namespace BTCPayServer.Client
{
public partial class BTCPayServerClient
{
public virtual async Task<ApiHealthData> GetHealth(CancellationToken token = default)
{
var response = await _httpClient.SendAsync(CreateHttpRequest("api/v1/health"), token);
return await HandleResponse<ApiHealthData>(response);
}
}
}