2.0.1 • Published 3 years ago

axios-curl v2.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

axios-curl

Axios interceptor logging the axios request sent as a curl command.

How to use

Install:

yarn add axios-curl

Add interceptor:

import axios from 'axios';
import axiosCurl from 'axios-curl';

axiosCurl(axios);

const result = await axios.get('https://google.com');
// curl -X GET 'https://google.com'

console.log(result.config.curl);
// curl -X GET 'https://google.com'