xboxman555X
Reactiflux4y ago
30 replies
xboxman555

React and Fetch Api; Returning reacts index.html File instead of api endpoint?

My Fetch Api with react is returning index.html instead of its data is there something with react I need to change?

```
fetch()
.then((response) => response.json())
.then((data) => console.log(data))






fetch()
.then((response) => response.text())
.then((data) => console.log(data))
Solution
do you not have
https://
on either of them?
Was this page helpful?