public void Write(CollectableValue value) { // This Write Plugin only knows about metrics if (!(value is MetricValue)) return; string payload = "[" + value.getJSON() + "]"; Logger.Debug("WriteHTTPPlugin: {0}", payload); string result = ""; using (var client = new WebClient()) { client.Headers[HttpRequestHeader.ContentType] = "application/json"; result = client.UploadString(_url, "POST", payload); } Logger.Debug("response: {0}", result); }
public void Write(CollectableValue value) { // This Write Plugin only knows about metrics if (!(value is MetricValue)) { return; } string payload = "[" + value.getJSON() + "]"; Logger.Debug("WriteHTTPPlugin: {0}", payload); string result = ""; using (var client = new WebClient()) { client.Headers[HttpRequestHeader.ContentType] = "application/json"; result = client.UploadString(_url, "POST", payload); } Logger.Debug("response: {0}", result); }
public void Write(CollectableValue value) { Console.WriteLine("ConsolePlugin: {0}", value.getJSON()); }