Setting cookies

Report a typo

Here you need to set a new header that will set the cookie header with the token=opensesame value.

// importing http module

http.createServer((request, response) => {
	/* Setting the new header that contains cookies */
	response.writeHead(200, {'Content-Type': 'text/html'});
	response.end();
}).listen(8080);
Enter a short text
___

Create a free account to access the full topic