add some debug logging
This commit is contained in:
@@ -65,13 +65,19 @@ public class ApiClient(string apiUrl) : IApiClient
|
|||||||
var url = ApiUrl + route;
|
var url = ApiUrl + route;
|
||||||
HttpContent content;
|
HttpContent content;
|
||||||
|
|
||||||
|
Log.DebugFormat("Api endpoint url is {0}", url);
|
||||||
|
|
||||||
if (message is not null)
|
if (message is not null)
|
||||||
content = new StringContent(serializer.Serialize(message)!, null, "application/json");
|
content = new StringContent(serializer.Serialize(message)!, null, "application/json");
|
||||||
else
|
else
|
||||||
content = new StringContent(string.Empty, null, "application/json");
|
content = new StringContent(string.Empty, null, "application/json");
|
||||||
|
|
||||||
|
Log.Debug("Content created.");
|
||||||
|
|
||||||
content.Headers.Add("API-AUTH-KEY", EncodeAuthKey());
|
content.Headers.Add("API-AUTH-KEY", EncodeAuthKey());
|
||||||
|
|
||||||
|
Log.Debug("Sending request...");
|
||||||
|
|
||||||
return await httpClient.PostAsync(url, content);
|
return await httpClient.PostAsync(url, content);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user