javascript - (node.js) How to get cookies from remote server? -


in php, getting cookies sent remote server matter of using curl cookie handling option enabled.

if treat server client making requests remote server, wondering how might done in node.js? server/app receiving these cookies? if so, how can name , values of these cookies?

i've tried using following node.js modules no avail:

  1. request (??? not part of functionality?)
  2. tough-cookie (not part of functionality)
  3. client-http (i empty array)
  4. node-curl (i empty array)

any pointers appreciated. thanks!

you can use http module comes node.js

var http = require('http');  http.get('http://www.google.ca', function(res) {     console.log(res.headers['set-cookie']); }); 

will give cookies google.ca try set on when visit.


Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -