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