MCPcopy Index your code
hub / github.com/3846masa/axios-cookiejar-support

github.com/3846masa/axios-cookiejar-support @v7.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v7.0.0 ↗ · + Follow
7 symbols 52 edges 15 files 0 documented · 0% 3 cross-repo links updated 4d agov7.0.0 · 2026-05-06★ 3331 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

axios-cookiejar-support

axios-cookiejar-support

github sponsors npm license standard-readme compliant

Add tough-cookie support to axios.

Table of Contents

Install

npm install axios tough-cookie axios-cookiejar-support

Usage

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 for more details.

Extended Request Config

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

Extension points exported contracts — how you extend this code

AxiosRequestConfig (Interface)
(no doc)
src/index.ts

Core symbols most depended-on inside this repo

wrapper
called by 6
src/index.ts
wrapper
called by 3
noop.js
main
called by 1
examples/wrap_static_axios.mjs
main
called by 1
examples/basic.mjs
requestInterceptor
called by 0
src/index.ts

Shape

Function 6
Interface 1

Languages

TypeScript100%

Modules by API surface

src/index.ts3 symbols
src/__tests__/helpers.ts1 symbols
noop.js1 symbols
examples/wrap_static_axios.mjs1 symbols
examples/basic.mjs1 symbols

For agents

$ claude mcp add axios-cookiejar-support \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page