Files
btcpayserver/BTCPayServer.Client/BTCPayServerClient.Health.cs
2020-04-21 14:59:33 +02:00

16 lines
421 B
C#

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