Installations
npm install @non-hacker/axios-cookiejar-support
Developer Guide
Typescript
Yes
Module System
CommonJS, UMD
Min. Node Version
>= 10.0.0
Node Version
12.18.3
NPM Version
6.14.6
Score
68.3
Supply Chain
98.9
Quality
74.7
Maintenance
100
Vulnerability
100
License
Releases
Contributors
Languages
TypeScript (87.66%)
JavaScript (8.5%)
Shell (3.84%)
validate.email 🚀
Verify real, reachable, and deliverable emails with instant MX records, SMTP checks, and disposable email detection.
Developer
3846masa
Download Statistics
Total Downloads
420
Last Day
1
Last Week
2
Last Month
11
Last Year
63
GitHub Statistics
MIT License
323 Stars
860 Commits
57 Forks
4 Watchers
5 Branches
3 Contributors
Updated on Feb 26, 2025
Bundle Size
188.00 B
Minified
151.00 B
Minified + Gzipped
Package Meta Information
Latest Version
1.0.1
Package Id
@non-hacker/axios-cookiejar-support@1.0.1
Unpacked Size
23.98 kB
Size
5.88 kB
File Count
13
NPM Version
6.14.6
Node Version
12.18.3
Total Downloads
Cumulative downloads
Total Downloads
420
Last Day
0%
1
Compared to previous day
Last Week
100%
2
Compared to previous week
Last Month
83.3%
11
Compared to previous month
Last Year
-33.7%
63
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
2
Peer Dependencies
3
axios-cookiejar-support
Add tough-cookie
support to axios
.
Install
1$ npm i axios tough-cookie axios-cookiejar-support
-- OR --
1$ npm i axios tough-cookie @3846masa/axios-cookiejar-support # Same as above
TypeScript
If you want to use it with TypeScript, add @types/tough-cookie
.
1npm i @types/tough-cookie
Usage
1const axios = require('axios').default; 2const axiosCookieJarSupport = require('axios-cookiejar-support').default; 3const tough = require('tough-cookie'); 4 5axiosCookieJarSupport(axios); 6 7const cookieJar = new tough.CookieJar(); 8 9axios 10 .get('https://google.com', { 11 jar: cookieJar, // tough.CookieJar or boolean 12 withCredentials: true, // If true, send cookie stored in jar 13 }) 14 .then(() => { 15 console.log(cookieJar); 16 });
See examples.
Notice: Set default cookiejar
axios@>=0.19.0
cannot assign defaults.jar
via axios.create()
before wrapping instance.
When you want to set defaults.jar
, please set directly after wrapping instance.
1const axios = require('axios').default; 2const axiosCookieJarSupport = require('axios-cookiejar-support').default; 3const tough = require('tough-cookie'); 4 5const instance = axios.create({ 6 // WARNING: This value will be ignored. 7 jar: new tough.CookieJar(), 8}); 9 10// Set directly after wrapping instance. 11axiosCookieJarSupport(instance); 12instance.defaults.jar = new tough.CookieJar();
Extended Request Config
c.f.) https://github.com/mzabriskie/axios#request-config
1{ 2 // `jar` is tough.CookieJar instance or boolean. 3 // If true, axios create CookieJar automatically. 4 jar: undefined, // default 5 6 // Silently ignore things like parse cookie errors and invalid domains. 7 // See also https://github.com/salesforce/tough-cookie 8 ignoreCookieErrors: false // default 9 10 // **IMPORTANT** 11 // If false, axios DONOT send cookies from cookiejar. 12 withCredentials: false // default 13}
Browser
Running on browser, this library becomes noop (config.jar
might be ignored).
Contribution
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
LICENSE
Author
Donate
Paypal.me (Onetime donate)

No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
30 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 10
Reason
all dependencies are pinned
Details
- Info: 8 out of 8 GitHub-owned GitHubAction dependencies pinned
- Info: 3 out of 3 third-party GitHubAction dependencies pinned
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
5 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-h5c3-5r3r-rr8q
- Warn: Project is vulnerable to: GHSA-rmvr-2pp2-xj38
- Warn: Project is vulnerable to: GHSA-xx4v-prfh-6cgc
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
Reason
Found 0/29 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/default.yml:1
- Warn: no topLevel permission defined: .github/workflows/stale.yml:1
- Info: no jobLevel write permissions found
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 30 are checked with a SAST tool
Score
5
/10
Last Scanned on 2025-02-24
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More