老师,我写的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