# axios-cookiejar-support

> Add tough-cookie support to axios.

Latest version **7.0.0** (published 2026-05-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install axios-cookiejar-support
pnpm add axios-cookiejar-support
yarn add axios-cookiejar-support
bun add axios-cookiejar-support
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 7.0.0 |
| Published | 2026-05-06 |
| First published | 2017-11-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=22.0.0 |
| Dependencies | 1 |
| Unpacked size | 7.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 334 |
| Author | 3846masa |
| Maintainers | 3846masa |
| Keywords | axios, cookie, cookiejar, cookies, tough-cookie |

## Links

- npm: https://www.npmjs.com/package/axios-cookiejar-support
- Repository: https://github.com/3846masa/axios-cookiejar-support
- Homepage: https://github.com/3846masa/axios-cookiejar-support#readme
- Issues: https://github.com/3846masa/axios-cookiejar-support/issues
- Funding: https://github.com/sponsors/3846masa
- npm.io page: https://npm.io/package/axios-cookiejar-support

## Dependencies (1)

- [http-cookie-agent](https://npm.io/package/http-cookie-agent.md) ^8.0.0

## Recent versions

- 7.0.0 (latest) — 2026-05-06
- 6.0.5 — 2025-11-19
- 6.0.4 — 2025-07-17
- 6.0.3 — 2025-06-29
- 6.0.2 — 2025-04-26
- 6.0.1 — 2025-04-23
- 6.0.0 — 2025-04-14
- 5.0.5 — 2024-12-16
- 5.0.4 — 2024-12-14
- 5.0.3 — 2024-09-26
- 5.0.2 — 2024-05-05
- 5.0.1 — 2024-04-07
- 5.0.0 — 2024-01-14
- 4.0.7 — 2023-06-22
- 4.0.6 — 2023-01-01
- … 31 more at https://npm.io/package/axios-cookiejar-support/versions

## README

# axios-cookiejar-support

![axios-cookiejar-support](./docs/assets/ogp.jpg)

[![github sponsors](https://flat.badgen.net/badge/GitHub%20Sponsors/Support%20me%20%E2%9D%A4/ff69b4?icon=github)](https://github.com/sponsors/3846masa)
[![npm](https://flat.badgen.net/npm/v/axios-cookiejar-support)](https://www.npmjs.com/package/axios-cookiejar-support)
[![license](https://flat.badgen.net/badge/license/MIT/blue)](LICENSE)
[![standard-readme compliant](https://flat.badgen.net/badge/readme%20style/standard/green)](https://github.com/RichardLitt/standard-readme)

Add `tough-cookie` support to axios.

## Table of Contents

- [Install](#install)
- [Usage](#usage)
  - [Extended Request Config](#extended-request-config)
- [Contributing](#contributing)
- [License](#license)

## Install

```
npm install axios tough-cookie axios-cookiejar-support
```

## Usage

```js
import axios from 'axios';
import { wrapper } from 'axios-cookiejar-support';
import { CookieJar } from 'tough-cookie';

const jar = new CookieJar();
const client = wrapper(axios.create({ jar }));

await client.get('https://example.com');
```

See [examples](./examples) for more details.

### Extended Request Config

```ts
import type { CookieJar } from 'tough-cookie';

declare module 'axios' {
  interface AxiosRequestConfig {
    jar?: CookieJar;
  }
}
```

See also https://github.com/axios/axios#request-config .

## FAQ

- Q. Why can't I assign the httpAgent / httpsAgent?
  - A. axios-cookiejar-support uses httpAgent / httpsAgent to read and write cookies. If other Agents are assigned, cookies cannot be read/written.
- Q. I want to use it with another Agent (e.g., http-proxy-agent).
  - A. Consider using http-cookie-agent. axios-cookiejar-support also uses http-cookie-agent. Read http-cookie-agent's README for more details.

## Contributing

PRs accepted.

## License

[MIT (c) 3846masa](./LICENSE)

---
_Source: https://npm.io/package/axios-cookiejar-support · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
