minimal optimizations
This commit is contained in:
@@ -67,16 +67,18 @@ public class ApiClient(string apiUrl) : IApiClient
|
||||
|
||||
Log.DebugFormat("Api endpoint url is {0}", url);
|
||||
|
||||
Log.Debug("Create content");
|
||||
|
||||
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.");
|
||||
Log.Debug("Build headers");
|
||||
|
||||
content.Headers.Add("API-AUTH-KEY", EncodeAuthKey());
|
||||
|
||||
Log.Debug("Sending request...");
|
||||
Log.Debug("Sending request");
|
||||
|
||||
return await httpClient.PostAsync(url, content);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user