I worked with React and fetch to send a request like:
fetch(`http://www.bilibili.com/index/catalogy/1-3day.json`,{
mode: "no-cors"
}).then(r => r.json()).then(r => {
console.log(r);
}).catch(err => {console.log(err);})
and the response is right in the network tab
but it throw an error that:
SyntaxError: Unexpected end of input
at SyntaxError (native)
at http://127.0.0.1:8888/js/video.bundle.js:30174:15
And when I try to log the promise,it appears to be an strange Object:
Response {type: "opaque", url: "", status: 0, ok: false, statusText: ""…}
Can someone help? I'm really confused with this