mongo-cookie-monster-2
v4.0.10
Published
Mongo Cookie Monster is a cookie store backed by MongoDb for tough-cookie module
Downloads
2
Readme
Mongo Cookie Monster
Mongo Cookie Monster is a cookie store backed by MongoDb for tough-cookie module
Installation
$ npm install mongo-cookie-monster
Options
connection
- connection string for mongocollection
- collection of mongoqueryColumn
- column of mongo
Usage
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('[email protected]');
request = request.defaults({ jar : request.jar(j) });
request('https://0x4139.com', function(err, response, body) {
console.log(response.headers['set-cookie']);
});
License
MIT