5.0.1 • Published 18 days ago

axios-cookiejar-support v5.0.1

Weekly downloads
101,474
License
MIT
Repository
github
Last release
18 days ago

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

valorant-api.js@liamcottle/valorant-apipac-qa-tools@tonicpow/tonicpow-jssap-axios-fix@dbgso/axios-node-cache-adapter-tmpproject-cpic-templatebanking-service-tsts-chipfox-api-clientclippd-ingestioncloudbeds-sdkeshop-image-fetcheralipay-mini-programshindanmaker-jsandroid-rs-buildf95apilumerin-wallet-core@roaloch/siiau.jscloudbeds-qa-requestaules_wrapperwilma.js@infinitebrahmanuniverse/nolb-axibitrix24oauthmeraki-portallibrus-api-v2mobidziennik-api@everything-registry/sub-chunk-1196koishi-plugin-bili-notifyoauth2-testerosu-map-dlpaotpnodejs-klikbca-parsernomadeducationnsp-connectnomlishminiprogram-managermobidziennik-sdkminimed-connect-to-nightscoutminimed-connect-to-nightscout-mattster98metronome-wallet-corenode-moodle-scrapernode-arlo-camerasnodanonightscout-connectniconiconode-red-contrib-solaredge-optimizersone-app-deployone-deployopenai-tokenporsche-connectporterpostman-to-mocha-converterpresto-card-clipinme_backendnode-hungryappnode-jsonrpc-clientnode-kakaolinknode-duplicatinode-fpl-apinautusnapier-clientpwnjsproject.co.idprojects.co.id@apmp/apmp-cli@aptuitiv/rets-clientbhhoang-gpt-tokenbilibili-api-tsbkapi@domoinc/ryuu-proxy@coopersystem-fsd/edesenv-client@coopersystem-fsd/gitcooper-clibotrest@cob/rest-api-wrapper@draying/draying-magayabookmaker-builderbusinesh@dbgso/axios-node-cache-adapter@damsdev/valclient@cyber-library/requestcheerio-req-pluscf-wrappercgpt-token@fyuzh/koishi-plugin-bilibili-notify@game-action/bananalotto@game-action/kingoloto@game-action/primolotto@vrilcode/node-red-wnsm-b2b@vtils/node-requestzhin-plugin-starrysignzionbox-desktopzionbox-service@api-lang/api-utils@api-lang/core@bbdash/bb-api@autorecord/douyin-recorderaxios-fetch-requestaxios-rebc-parks-clientbananalotto-client
5.0.1

18 days ago

5.0.0

3 months ago

4.0.7

10 months ago

4.0.5

1 year ago

4.0.4

1 year ago

4.0.6

1 year ago

4.0.3

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

4.0.2

2 years ago

2.0.5

2 years ago

3.0.0

2 years ago

2.0.4

2 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.1

4 years ago

1.0.0

4 years ago

0.5.1

4 years ago

0.5.0

5 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.6

6 years ago

0.3.5

6 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.2

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.4

6 years ago

0.1.3

6 years ago