private async Task PostAsync(TestNotification request) { var options = GetOptions(request.UserId); var body = new Dictionary <string, string> { { "token", options.Token }, { "user", options.UserKey }, { "title", "Test Notification" }, { "message", "This is a test notification from Jellyfin" } }; _logger.LogDebug("Pushover <TEST> to {0} - {1}", options.Token, options.UserKey); var requestOptions = new HttpRequestOptions { Url = PluginConfiguration.Url, RequestContent = _jsonSerializer.SerializeToString(body), RequestContentType = "application/json", LogErrorResponseBody = true }; await _httpClient.Post(requestOptions).ConfigureAwait(false); }
public void Post(TestNotification request) { PostAsync(request) .GetAwaiter() .GetResult(); }