Example #1
0
 public static async Task <string> GetJson(string url)
 {
     try
     {
         mClient.DefaultRequestHeaders.Remove("X-App-Token");
         mClient.DefaultRequestHeaders.Add("X-App-Token", GetCoolapkAppToken());
         return(await mClient.GetStringAsync(new Uri("https://api.coolapk.com/v6" + url)));
     }
     catch (HttpRequestException e)
     {
         rootPage.ShowHttpExceptionMessage(e);
         return(string.Empty);
     }
     catch { throw; }
 }