public async Task UpdateBookingAsync() { using (var _clientProvider = new HttpClientProvider()) { var uniquePartOfUri = Booking.Id; var newDates = new string[] { StartDate, Nights.ToString() }; await AddAuthCookieAsync(_clientProvider.clientHandler); await GetCsrfToken(_clientProvider); await PutAsync($"{_uri}{uniquePartOfUri}", newDates, _clientProvider); await GetABookingAsync(); } }
public async Task BookAccommodationAsync() { using (var _clientProvider = new HttpClientProvider()) { var uniquePartOfUri = "book"; var bookingInfo = new string[] { StartDate, Booking.BookedBy.Id.ToString(), Nights.ToString(), Booking.Accommodation.Id.ToString() }; await AddAuthCookieAsync(_clientProvider.clientHandler); await GetCsrfToken(_clientProvider); await PostAsync($"{_uri}{uniquePartOfUri}", bookingInfo, _clientProvider); } }