TypeError: Failed to execute 'fetch' on 'Window': Invalid name
来源:3-3 CORS跨域限制以及预请求验证
梁凤波
2019-01-22
老师,我写的test.html文件的fetch方法这样写:
fetch('http://localhost:8887', {
method: 'POST',
headers: {
'X-Test-Cors:': '123'
}
})
浏览器会报错,请问如何解决呢
(index):16 Uncaught (in promise) TypeError: Failed to execute 'fetch' on 'Window': Invalid name
写回答
1回答
-
Jokcy
2019-01-23
你用的啥浏览器?
042019-01-24
相似问题