I am referring to the web API that I wrote. I work on errors on both sides and get 500 errors. I want to see this error message in order to understand what might be the problem. How to find it?
using (var client = new HttpClient()) { var fooURL = Url.RouteUrl("PayrollApi", new { httproute = string.Empty, controller = "LeaveRequest" }, Request.Url.Scheme); var repsonse = client.PostAsJsonAsync(fooURL, leaveRequest).Result; }
I donβt see where this text can be saved, so I can figure out what other errors need to be fixed. How to get this text?
Update : I didnβt specify something. I set a breakpoint on the WebAPI that I call, and the breakpoint never hits. However, when I call it a poster, I hit a breakpoint. The correct URL.
public HttpResponseMessage Post([FromBody]LeaveRequest value) { if (ModelState.IsValid) {
source share