how can we receive a cookie as the 'set-cookie' parameter of the response and header and then send this cookie in next request.All this using the 'http' module and no 3rd party modules.I am basically interested on how i will post the cookie as a parameter in the header about to go in the next request
oh finally found my mistake i wasnt including the cookie parameter in my header list.I was writing it like this:
var options = {host:url_parsed.host, path:url_parsed.path, method:'GET', 'Cookie':cookie, 'Accept':'/', 'Connection':'keep-alive', };
I should actually be like this:
var options = {host:url_parsed.host, path:url_parsed.path, method:'GET', headers:{'Cookie':cookie}, 'Accept':'/', 'Connection':'keep-alive', };