axios-curl

2.0.1 • Public • Published

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'

Readme

Keywords

none

Package Sidebar

Install

npm i axios-curl

Weekly Downloads

44

Version

2.0.1

License

MIT

Unpacked Size

8.23 kB

Total Files

8

Last publish

Collaborators

  • damianobarbati