Go to file
2019-01-14 04:46:38 +01:00
src fixes to get it working 2019-01-14 04:30:38 +01:00
.gitignore initial commit 2019-01-13 23:30:17 +01:00
LICENSE initial commit 2019-01-13 23:30:17 +01:00
package-lock.json initial commit 2019-01-13 23:30:17 +01:00
package.json publish new version with the fixes 2019-01-14 04:31:51 +01:00
README.md add short readme 2019-01-14 04:46:38 +01:00

node-fetch-cookies

node-fetch wrapper that adds support for cookie-jars

Example Usage

import cookies from "node-fetch-cookies";
// "rw" are the flags, meaning cookies will be read and written from/to the cookie jar. r = read, w = write
// second argument is the filename, can also be undefined if you don't want to read/write the cookies from/to a file
let cookieJar = new cookies.CookieJar("rw", "path/to/file.json");
// first parameter is the url, second the options, just like node-fetch. third parameter is the cookie jar
// returns a response object just like node-fetch
cookies.fetch("https://example.page/example/path", null, cookieJar);