public void CheckAPIStatus() { using (var client = new HttpClient()) { try { client.DefaultRequestHeaders.Add("Authorization", "Bearer " + APIKey); client.DefaultRequestHeaders.Add("Accept", "application/vnd.api+json"); var response = client.GetAsync(StatusUrl).Result; if (response.IsSuccessStatusCode) { var result = response.Content.ReadAsStringAsync().Result; //var players = PlayerData.FromJson(result); APIStatus = StatusData.FromJson(result); } } catch (Exception ex) { throw ex; } } statusChecked = true; }