Вот что я попробовал:
Код: Выделить всё
fetch("https://localhost:44320/api/example", {
method: "GET",
headers: {
"Content-Type": "application/json",
},
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error("Error:", error));
вещи, которые я проверил: < /p>
API работает на почтальоне.
IIS работает и обслуживает API.>
Подробнее здесь: https://stackoverflow.com/questions/794 ... eact-nativ