public void Emit(LogEvent logEvent)
        {
            var activity = logEvent.TryGetPropertyValue("activity");
            var icon     = logEvent.TryGetPropertyValue("icon");
            var title    = logEvent.TryGetPropertyValue("title");

            var message = new GlipMessage(logEvent.RenderMessage())
            {
                Activity = activity,
                Icon     = icon == null ? null : new Uri(icon),
                Title    = title,
            };

            SendRequest(message);
        }
        private void SendRequest(GlipMessage message)
        {
            var body = JsonConvert.SerializeObject(message, _settings);

            var request = WebRequest.Create(WebHook);

            request.Method      = "POST";
            request.ContentType = "application/json";

            using (var stream = request.GetRequestStream())
            {
                var bytes = Encoding.UTF8.GetBytes(body);
                stream.Write(bytes, 0, bytes.Length);
            }

            var response = request.GetResponse();

            return;
        }