tough-cookie-file-store
Another file store for tough-cookie module.
The main purpose of this project is to have a published module with the original functionality of tough-cookie-filestore plus various fixes, improvements and features that I found useful.
Installation
$ npm install tough-cookie-file-store
Usage
var cookieStore = require('tough-cookie-file-store');
var CookieJar = require('tough-cookie').CookieJar;
var jar = new CookieJar(new cookieStore('./cookie.json'));
var cookieStore = require('tough-cookie-file-store');
var cookieInstance = new cookieStore('./cookie.json');
cookieInstance.isExpired()
cookieInstance.isEmpty()
var cookieStore = require('tough-cookie-file-store');
var j = request.jar(new cookieStore('./cookie.json'));
request = request.defaults({ jar : j })
request('http://www.google.com', function() {
request('http://images.google.com')
})
Credits
tough-cookie-filestore module: @mitsuru
fixes/improvements: @sarkian @mudkipme @vladh
expired feature: @zhzehong
License
MIT