コード例 #1
0
 private string GetHttpResponse(string url)
 {
     try
     {
         var response = TelemetryClient.GetAsync(url).Result;
         if (response.IsSuccessStatusCode)
         {
             return(response.Content.ReadAsStringAsync().Result);
         }
     }
     catch (AggregateException aex)
     {
         Trace.TraceError("Error getting response for {0}. {1}", url, aex);
     }
     return(null);
 }