and in res.writeHead (200, {
) "Set-Cookie": "myCookie=test",
"Content-Type": "text/plain"
});
Why can"t you use res.send () if you want to return content after setting cookie? What should I use? Also available for res.cookie ("myCookie","test",) or res.writeHead (200, {
"Set-Cookie": "myCookie=test",
"Content-Type": "text/plain"
}) Why does this way of setting cookie not take effect in the response header when the first request is made, and there is no cookie?? in the response header only when the second request is made?