Mongo Cookie Monster is a cookie store backed by MongoDb for tough-cookie module
$ npm install mongo-cookie-monster
connection
- connection string for mongocollection
- collection of mongoqueryColumn
- column of mongo
var request = require('request');
var mongoConnection = {
connection: 'username:password@mongo-domain/mongo-database',
collection: 'mongo-collection',
queryColumn: 'email'
};
var CookieMonster = require('mongo-cookie-monster')(mongoConnection);
var j = new CookieMonster('nytr0gen.george@gmail.com');
request = request.defaults({ jar : request.jar(j) });
request('https://0x4139.com', function(err, response, body) {
console.log(response.headers['set-cookie']);
});
MIT