var client = new RestClient(Request.Url.GetLeftPart(UriPartial.Authority).ToString()); var request = new RestRequest("http://domain.co.za/api/student/getBookedSlotHistory", Method.POST); request.AddHeader("cache-control", "no-cache"); request.AddObject(new StudentInput() { StudentNumber = "219193029"//UserIdentity.Username() }); var result = client.Execute<StudentBookingHistoryOutput>(request); var data = JsonConvert.DeserializeObject<StudentBookingHistoryOutput>(result.Content);
[HttpPost] [Route("api/student/getBookedSlotHistory")] public async Task<StudentBookingHistoryOutput> GetHistory(StudentInput input) { return await _studentRepository.GetBookingHistoryData(input); }
request.UseDefaultCredentials = true;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)