private static async Task TestTicketSalesApi() { _consoleHelper.OutputTime(); TicketInformation ticketInformation = CreateTestTicketInformation(); var result = await CallOrderTicket(ticketInformation); _consoleHelper.OutputTime(); }
private static async Task <bool> CallOrderTicket(TicketInformation ticketInformation) { var json = JsonConvert.SerializeObject(ticketInformation); var data = new StringContent(json, Encoding.UTF8, "application/json"); HttpResponseMessage response = await client.PostAsync( $"{_ticketSalesApiPath}/orderticket", data); return(response.IsSuccessStatusCode); }