From a835ed626b683466188849eecc807024b42d4a0f Mon Sep 17 00:00:00 2001 From: DucDangAnh Date: Wed, 15 Jul 2020 16:17:06 +0700 Subject: [PATCH] ApiController - simplified CardModel in GetCardInformation --- AIParkingApplication/ApiController.cs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/AIParkingApplication/ApiController.cs b/AIParkingApplication/ApiController.cs index b383691..40951ab 100644 --- a/AIParkingApplication/ApiController.cs +++ b/AIParkingApplication/ApiController.cs @@ -85,14 +85,10 @@ namespace AIParkingApplication int requestCounter = 1; try { - var request = new CardModel() - { - CardNumber = cardNumber - }; HttpResponseMessage response; do { - response = await httpClient.PostAsJsonAsync("/api/check-card", request); + response = await httpClient.PostAsJsonAsync("/api/check-card", new CardModel { CardNumber = cardNumber }); response.EnsureSuccessStatusCode(); requestCounter += 1; await Task.Delay(800);