Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

curl-to-postmanv2

Package Overview
Dependencies
Maintainers
6
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

curl-to-postmanv2 - npm Package Compare versions

Comparing version 1.3.0 to 1.4.0

.github/workflows/test.yaml

3

CHANGELOG.md
# cURL to Postman Importer Changelog
#### v1.4.0 (March 17, 2023)
* Fixed issue [#7895](https://github.com/postmanlabs/postman-app-support/issues/7895) where cURL with no specific method defined for formdata type of body were not converted correctly.
#### v1.3.0 (March 02, 2023)

@@ -4,0 +7,0 @@ * Fix for [#8087](https://github.com/postmanlabs/postman-app-support/issues/8087) - Add support to convert digest and NTLM auth types

2

package.json
{
"name": "curl-to-postmanv2",
"version": "1.3.0",
"version": "1.4.0",
"description": "Convert a given CURL command to a Postman request",

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

@@ -85,3 +85,4 @@ const commander = require('commander'),

else if (curlObj.data.length > 0 || curlObj.dataAscii.length > 0 ||
curlObj.dataUrlencode.length > 0 || curlObj.dataRaw.length > 0 || curlObj.dataBinary) {
curlObj.dataUrlencode.length > 0 || curlObj.dataRaw.length > 0 ||
curlObj.dataBinary || curlObj.form.length > 0) {
return 'POST';

@@ -578,3 +579,4 @@ }

dataUrlencode,
formData;
formData,
isMethodGuessed = false;

@@ -606,2 +608,3 @@ try {

curlObj.request = this.getRequestMethod(curlObj);
isMethodGuessed = true;
}

@@ -691,2 +694,8 @@

request.body.formdata = this.parseFormBoundryData(formData, content_type);
/**
* As we are parsing raw args here to detect form-data body, make sure we are also
* defining method if not already defined in cURL
*/
(!_.isEmpty(request.body.formdata) && isMethodGuessed) && (request.method = 'POST');
}

@@ -693,0 +702,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc