public async Task <string> PerformApiRequest(ApiRequestParameters parameters) { try { if (parameters == null) { return(null); } if (!await CheckInternetStatus()) { return(null); } var response = await _apiRequest.GetHttpResponseFromRequest(parameters); if (response == null || !response.IsSuccessStatusCode) { DisplayAlert("Error", "There was an issue communicating with the services"); return(null); } var content = await response.Content.ReadAsStringAsync(); if (string.IsNullOrEmpty(content)) { DisplayAlert("Error", "The content had an issue."); return(null); } return(content); } catch (Exception) { DisplayAlert("Error", "Communication issue"); return(null); } }