且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

SyntaxError:JSON.parse:使用fetch在JSON数据的第1行第1列中的数据意外结束

更新时间:2023-01-06 07:38:59

type: "opaque"

这意味着JavaScript 看不到响应的内容.

This means that JavaScript cannot see the content of the response.

由于JS无法看到内容,因此它可以看到的内容长度为零.因此,在找到任何可以使之成为有效JSON的内容之前,它会到达内容的结尾.

Since JS can't see the content, the content it can see has zero length. So it gets to the end of the content before finding anything that would make it valid JSON.

它是不透明的,因为您说过:

It is opaque because you said:

mode: 'no-cors'

不要那样做.