Aditi.Scheduler.ScheduledTasks.GetTaskHistoryAsync C# (CSharp) Method

GetTaskHistoryAsync() public method

public GetTaskHistoryAsync ( string taskId, string token = null ) : Task
taskId string
token string
return Task
        public async Task<WebhookAuditResult> GetTaskHistoryAsync(string taskId, string token = null)
        {
            WebhookAuditResult historyResult;

            string historyUrl = string.Concat(SchedulerConstants.SchedulerTaskUri, taskId, SchedulerConstants.HistoryRelativePath);
            
            var client = new HttpClient();
            client.DefaultRequestHeaders.Add(
                "Authorization",
                new Signature(this._subscriptionId, this._secretKey).ToString());
            var response = await client.GetAsync(historyUrl);

            response.EnsureSuccessStatusCode();

            return await response.Content.ReadAsAsync<WebhookAuditResult>();
        }