public async Task <CustomerInfo> GetCustomerInfoAsync(string customerServiceUrl, int customerId) { var client = new CustomersClient(customerServiceUrl, _httpClientFactory.CreateClient()); //if customer does not exist -> 404 var customerInfo = await client.GetAsync(customerId); return(new CustomerInfo { Name = customerInfo.Name, Surname = customerInfo.Surname }); }