http.createServer((request, response) => { response.setHeader('Access-Control-Allow-Origin','*') request.on('data', data => { console.log(data) }) request.on('end', () => { console.log(request) response.end('success') }) }).listen(8088)
在请求的时候,如果传参为String类型的,可以成功,但是如果请求Object类型的,就报错:
Request header field Content-Type is not allowed by Access-Control-Allow-Headers in preflight response.
请问我应该怎么写啊
三国纷争
互换的青春