Never Patronize Mothers

    axios-cookiejar-support
    TypeScript icon, indicating that this package has built-in type declarations

    4.0.3 • Public • Published

    axios-cookiejar-support

    axios-cookiejar-support

    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 .

    Contributing

    PRs accepted.

    License

    MIT (c) 3846masa

    Install

    npm i axios-cookiejar-support

    DownloadsWeekly Downloads

    194,871

    Version

    4.0.3

    License

    MIT

    Unpacked Size

    6.26 kB

    Total Files

    6

    Last publish

    Collaborators

    • 3846masa