예제 #1
0
        public void PostMessage(AlertCard payload)
        {
            var payloadJson = _encoding.GetBytes(JsonConvert.SerializeObject(payload));

            using (WebClient client = new WebClient())
            {
                var response = client.UploadData(_uri, "POST", payloadJson);

                //The response text is usually "ok"
                string responseText = _encoding.GetString(response);
            }
        }