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)
during the request, if the parameter is of String type, it can be successful, but if the request is of Object type, an error will be reported:
Request header field Content-Type is not allowed by Access-Control-Allow-Headers in preflight response.
how should I write it