Skip to content

ivanmarban/tough-cookie-file-store

Repository files navigation

tough-cookie-file-store

NPM

A JSON file store implementation for tough-cookie module

Version npm npm Downloads Tests Status Coverage Status dependencies Status JavaScript Style Guide Donate

Installation

$ npm install tough-cookie-file-store

Usage

const { CookieJar, Cookie } = require('tough-cookie')
const CookieFileStore = require('tough-cookie-file-store').FileCookieStore
const cookieJar = new CookieJar(new CookieFileStore('./cookie.json'))
const cookie = Cookie.parse('foo=bar; Domain=example.com; Path=/')
cookieJar.setCookie(cookie, 'http://example.com', function (error, cookie) {
  console.log(cookie)
})

License

MIT

About

A JSON file store implementation for tough-cookie module

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •