Я новичок! Пытаюсь получить json строку из моего api с аутентификацией windows. Вот код:
$(document).ready(function () {
let amount = $('#amount');
let created = $('#created');
$.ajax({
type: 'Get',
url: 'https://localhost:44327/api/trade',
dataType: 'json',
xhrFields: {
withCredentials: true
},
success: function (data) {
amount.append(data.Amount);
created.append(data.Created);
},
error: function () {
alert('ERROR');
}
});
});
Постоянно выкидывает ошибку из блока error. Json ответ выглядит следующим образом.
{
"Amount":131670981686210700491833.78,
"Created":"2022-08-17T00:00:00"
}