2020-04-16 15:39:08 +02:00
|
|
|
using System.Threading;
|
|
|
|
using System.Threading.Tasks;
|
2020-04-21 10:39:04 +02:00
|
|
|
using BTCPayServer.Client.Models;
|
2020-04-16 15:39:08 +02:00
|
|
|
|
|
|
|
namespace BTCPayServer.Client
|
|
|
|
{
|
|
|
|
public partial class BTCPayServerClient
|
|
|
|
{
|
2020-04-21 10:39:04 +02:00
|
|
|
public virtual async Task<ApiHealthData> GetHealth(CancellationToken token = default)
|
2020-04-16 15:39:08 +02:00
|
|
|
{
|
2020-04-21 16:43:14 +02:00
|
|
|
var response = await _httpClient.SendAsync(CreateHttpRequest("api/v1/health"), token);
|
2020-04-21 10:39:04 +02:00
|
|
|
return await HandleResponse<ApiHealthData>(response);
|
2020-04-16 15:39:08 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|