Exemplo n.º 1
0
 static void HttpRequestAsync(string url)
 {
     results = "WAIT|Is requesting";
     new Task(async() =>
     {
         try
         {
             var result = DownloadHelper.AsyncGetHttp(url, "GET");
             results    = "SUCCESS|" + await result; //等待返回
         }
         catch (Exception e)
         {
             results = "ERROR|" + e.Message;
         }
     }).Start();
 }