skip to Main Content

jQuery ajax call get API that returns Task<ActionResult<List<ApiObject>>> keeps getting 500 error response

HTML: <div id="api-calls" class="ui-drop-shadow"> <button id="ajax" class="form-control">ajax call</button> </div> jQuery call is as below: on(ajax, "click", function(event) { alert('ajax'); $.ajax({ type: "GET", data: {SiteId: 8}, dataType: "json", //dataType: "application/json, text/plain, */*", //dataType: "jsonp", //url: "https://localhost:44310/api/site/search?SiteId=8", url: "https://localhost:44310/api/site/search", success: function(data){ alert(data);…

VIEW QUESTION
Back To Top
Search