Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/Dapr.Client/DaprClientGrpc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1743,6 +1743,12 @@ public override async Task<bool> CheckHealthAsync(CancellationToken cancellation
{
var path = "/v1.0/healthz";
var request = new HttpRequestMessage(HttpMethod.Get, new Uri(this.httpEndpoint, path));

if (this.apiTokenHeader is not null)
{
request.Headers.Add(this.apiTokenHeader.Value.Key, this.apiTokenHeader.Value.Value);
}

try
{
using var response = await this.httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, cancellationToken);
Expand All @@ -1759,6 +1765,12 @@ public override async Task<bool> CheckOutboundHealthAsync(CancellationToken canc
{
var path = "/v1.0/healthz/outbound";
var request = new HttpRequestMessage(HttpMethod.Get, new Uri(this.httpEndpoint, path));

if (this.apiTokenHeader is not null)
{
request.Headers.Add(this.apiTokenHeader.Value.Key, this.apiTokenHeader.Value.Value);
}

try
{
using var response = await this.httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead, cancellationToken);
Expand Down