Ejemplo n.º 1
0
 static async Task SendMessagesAsync()
 {
     if (MessageQueue.Count > 0)
     {
         var list = MessageQueue.ToArray();
         MessageQueue.Clear();
         using (var cl = new HttpClient())
         {
             var r = await cl.PostAsync("http://caster.zeegzag.com/enqueue/alarm",
                                        new StringContent(BotMessage.Serialize(list), Encoding.UTF8, "application/json"));
         }
     }
 }