Skip to content

Commit

Permalink
Merge pull request hashicorp#12 from ntent-ad/master
Browse files Browse the repository at this point in the history
Bug fix: do not ignore "note" parameter in UpdateTTL method.
  • Loading branch information
highlyunavailable committed Jul 21, 2015
2 parents b767a21 + 59f8666 commit a36c0ab
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Consul/Agent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

using System;
using System.Collections.Generic;
using System.Web;
using Newtonsoft.Json;

namespace Consul
Expand Down Expand Up @@ -450,8 +451,10 @@ public void FailTTL(string checkID, string note)
/// <returns>An empty write result</returns>
public WriteResult<object> UpdateTTL(string checkID, string note, TTLStatus status)
{
return _client.CreateWriteRequest<object, object>(string.Format("/v1/agent/check/{0}/{1}", status.Status,
checkID)).Execute();
var request = _client.CreateWriteRequest<object, object>(string.Format("/v1/agent/check/{0}/{1}", status.Status, checkID));
if(!string.IsNullOrEmpty(note))
request.Params.Add("note", HttpUtility.UrlEncode(note));
return request.Execute();
}

/// <summary>
Expand Down

0 comments on commit a36c0ab

Please sign in to comment.