public async Task <ActionResult> Index() { var results = new List <Picture>(); var response = await _clientWrapper.GetAll("api/picturesapi"); if (response.IsSuccessStatusCode) { var serializedResult = response.Content.ReadAsStringAsync().Result; results = JsonConvert.DeserializeObject <List <Picture> > (serializedResult); return(View(results)); } return(View("Error")); }