// PUT: api/Basket/X public async Task <BasketItemDto> UpdateItem(int customerId, BasketItemDto updatedItem) { var client = _clientFactory.CreateClient("RetryAndBreak"); string accessToken = await HttpContext.GetTokenAsync("access_token"); client.SetBearerToken(accessToken); var response = await client.PutAsJsonAsync("https://customerorderingthamco.azurewebsites.net/Basket/" + customerId, updatedItem); response.EnsureSuccessStatusCode(); return(updatedItem); }
public Task <BasketItemDto> UpdateItem(int customerId, BasketItemDto updatedItem) { throw new NotImplementedException(); }
public Task <BasketItemDto> AddItem(BasketItemDto newItem) { _basket.Add(newItem); return(Task.FromResult(newItem)); }