Socket
Socket
Sign inDemoInstall

axios-curlirize

Package Overview
Dependencies
0
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.4 to 1.3.5

.github/FUNDING.yml

14

dist/curlirize.js

@@ -1,2 +0,2 @@

'use strict';
"use strict";

@@ -7,3 +7,3 @@ Object.defineProperty(exports, "__esModule", {

var _CurlHelper = require('./lib/CurlHelper');
var _CurlHelper = require("./lib/CurlHelper");

@@ -33,6 +33,8 @@ // thanks to https://github.com/uyu423

} finally {
callback({
command: req.curlCommand,
object: req.curlObject
});
if (req.curlirize !== false) {
callback({
command: req.curlCommand,
object: req.curlObject
});
}
return req;

@@ -39,0 +41,0 @@ }

{
"name": "axios-curlirize",
"version": "1.3.4",
"version": "1.3.5",
"description": "Axios third-party module to print all axios requests as curl commands in the console. This repository is forked from axios-curlirize <https://www.npmjs.com/package/axios-curlirize> and supports use with Node JS without having to enable ES6 imports. This repo was inspired by an issue <https://github.com/delirius325/axios-curlirize/issues/20> raised on the origional repository <https://github.com/delirius325/axios-curlirize>. Special thanks to Anthony Gauthier <https://github.com/delirius325>, the author of axios-curlirize",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -71,1 +71,18 @@ [![Codacy Badge](https://api.codacy.com/project/badge/Grade/7d519058c2f340428a1b7ef22d71368f)](https://app.codacy.com/app/antho325/axios-curlirize?utm_source=github.com&utm_medium=referral&utm_content=delirius325/axios-curlirize&utm_campaign=Badge_Grade_Dashboard)

```
# Disable the logger
By default, all requests will be logged. But you can disable this behaviour unitarily by setting the `curlirize` option to false within the axios request.
```javascript
axios
.post('http://localhost:7500/', { dummy: 'data' }, {
curlirize: false
})
.then(res => {
console.log('success');
})
.catch(err => {
console.log(err);
});
```

@@ -23,6 +23,8 @@ import { CurlHelper } from './lib/CurlHelper';

} finally {
callback({
command: req.curlCommand,
object: req.curlObject,
});
if (req.curlirize !== false) {
callback({
command: req.curlCommand,
object: req.curlObject
});
}
return req;

@@ -29,0 +31,0 @@ }

@@ -57,2 +57,5 @@ export class CurlHelper {

getUrl() {
if (this.request.baseURL) {
return this.request.baseURL + "/" + this.request.url;
}
return this.request.url

@@ -59,0 +62,0 @@ }

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc