Exemple #1
0
        public static string UpdateMessage(int id, MessageDistribution message)
        {
            StringContent content = new StringContent(JsonConvert.SerializeObject(message), Encoding.UTF8, "application/json");

            HttpResponseMessage response = Base.Put("distribute/update/{0}", content, id);

            return(response.Content.ReadAsStringAsync().Result);
        }
Exemple #2
0
        public static string SendMessage(MessageDistribution message)
        {
            StringContent content = new StringContent(JsonConvert.SerializeObject(message), Encoding.UTF8, "application/json");

            HttpResponseMessage response = Base.Post("distribute", content);

            return(response.Content.ReadAsStringAsync().Result);
        }