diff --git a/Consul/Agent.cs b/Consul/Agent.cs index 3d3b5a1eb797..03f2655b7f7a 100644 --- a/Consul/Agent.cs +++ b/Consul/Agent.cs @@ -18,6 +18,7 @@ using System; using System.Collections.Generic; +using System.Web; using Newtonsoft.Json; namespace Consul @@ -450,8 +451,10 @@ public void FailTTL(string checkID, string note) /// An empty write result public WriteResult UpdateTTL(string checkID, string note, TTLStatus status) { - return _client.CreateWriteRequest(string.Format("/v1/agent/check/{0}/{1}", status.Status, - checkID)).Execute(); + var request = _client.CreateWriteRequest(string.Format("/v1/agent/check/{0}/{1}", status.Status, checkID)); + if(!string.IsNullOrEmpty(note)) + request.Params.Add("note", HttpUtility.UrlEncode(note)); + return request.Execute(); } ///