tough-cookie-filestore is a File store modified from tough-cookie-filestore, fully compatible with it. And add some functions needed in use.
$ npm install tough-cookie-store
var FileCookieStore = require("tough-cookie-store"),
request = require('request');
var fileStore = new FileCookieStore(filePath, option);
var jar = request.jar(fileStore);
var req = request.defaults({jar: jar});
file path of cookie file.
with or without encrypt
true
as default, unless explicitly specified as false fileStore will encrypt the cookie file with the default setting.
'aes-256-cbc'
as default, you can use any algorithm nodejs supported.
'tough-cookie-store'
as default.
sync version of fileStore.findCookie
, return a cookie object.
write current cookies to file.
check if fileStore is empty.
MIT