Gathering detailed insights and metrics for curlirize-for-axios
Gathering detailed insights and metrics for curlirize-for-axios
Gathering detailed insights and metrics for curlirize-for-axios
Gathering detailed insights and metrics for curlirize-for-axios
axios plugin converting requests to cURL commands, saving and logging them.
npm install curlirize-for-axios
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
191 Stars
157 Commits
30 Forks
1 Watchers
6 Branches
12 Contributors
Updated on May 19, 2025
Latest Version
1.4.0
Package Id
curlirize-for-axios@1.4.0
Unpacked Size
15.75 kB
Size
5.14 kB
File Count
11
NPM Version
6.12.0
Node Version
8.11.4
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
6
This module is an axios third-party module to log any axios request as a curl command in the console. It was originally posted as a suggestion on the axios repository, but since we believed it wasn't in the scope of axios to release such feature, we decided to make it as an independent module.
The module makes use of axios' interceptors to log the request as a cURL command. It also stores it in the response's config object. Therefore, the command can be seen in the app's console, as well as in the res.config.curlCommand
property of the response.
By default, axios-curlirize uses the console.log/error()
functions. It is possible to change the logger by doing something similar to this:
1// when initiating your curlirize instance 2curlirize(axios, (result, err) => { 3 const { command } = result; 4 if(err) { 5 // use your logger here 6 } else { 7 // use your logger here 8 } 9});
axios-curlirize is super easy to use. First you'll have to install it.
1npm i --save axios-curlirize@latest
Then all you have to do is import and instanciate curlirize in your app. Here's a sample:
1 import axios from 'axios'; 2 import express from 'express'; 3 import curlirize from 'axios-curlirize'; 4 5 const app = express(); 6 7 // initializing axios-curlirize with your axios instance 8 curlirize(axios); 9 10 // creating dummy route 11 app.post('/', (req, res) => { 12 res.send({hello: 'world!'}) 13 }); 14 15 // starting server 16 app.listen(7500, () => { 17 console.log('Dummy server started on port 7500') 18 /* 19 The output of this in the console will be : 20 curl -X POST -H "Content-Type:application/x-www-form-urlencoded" --data {"dummy":"data"} http://localhost:7500/ 21 */ 22 axios.post('http://localhost:7500/', {dummy: 'data'}) 23 .then((res) => { 24 console.log('success'); 25 }) 26 .catch((err) => { 27 console.log(err); 28 }); 29 });
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 3/11 approved changesets -- score normalized to 2
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
22 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More