public async Task <IEnumerable <Customer> > getCustomers() { using (var client = new HttpClient()) { client.BaseAddress = new Uri("https://demo0636357.mockable.io/"); client.DefaultRequestHeaders.Accept.Clear(); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); HttpResponseMessage response = await client.GetAsync("customers/"); if (response.IsSuccessStatusCode) { return(_jsonParser.ParseCustomers(response)); } } return(null); }