Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

axios-cookiesupport

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

axios-cookiesupport

Add tough-cookie support to axios.

  • 5.0.3
  • unpublished
  • npm
  • Socket score

Version published
Weekly downloads
8
decreased by-88.89%
Maintainers
0
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 02 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc