New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

wincurl

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wincurl

A tool to convert your macOS/Linux cURL requests to a Windows equivalent.

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
1
-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

WinCurl

A tool to convert your macOS/Linux cURL requests to a Windows equivalent.

Build Status Coverage Status NPM Licence

WinCurl trims whitespace, escapes bad characters, replaces quotes, and replaces line continuation characters for Windows. Requires Javascript to be enabled in your web browser.

Install

Install the node module below or download the Javascript manually.

npm i wincurl

Usage

There are multiple ways to take advantage of WinCurl. Below is an example of what to expect.

Take this:

curl -X POST https://api.easypost.com/v2/shipments \
    -u <YOUR_TEST/PRODUCTION_API_KEY>: \
    -d 'shipment[to_address][id]=adr_...' \
    -d 'shipment[from_address][id]=adr_...' \
    -d 'shipment[parcel][id]=prcl_...' \
    -d 'shipment[options][address_validation_level]=0'

And turn it into this:

curl -X POST https://api.easypost.com/v2/shipments ^
-u <YOUR_TEST/PRODUCTION_API_KEY>: ^
-d "shipment[to_address][id]=adr_..." ^
-d "shipment[from_address][id]=adr_..." ^
-d "shipment[parcel][id]=prcl_..." ^
-d "shipment[options][address_validation_level]=0"

Website

View WinCurl in action here: https://justintime50.github.io/wincurl.

Manual Download

Download WinCurl and open the index.html file in your browser (double click the file) and paste in your cURL request. Press convert and you'll have your Windows curl request output.

HTML Example

Use id's wincurl-input and wincurl-output to pass in curl data and get the converted data out.

<!-- Import WinCurl -->
<script src="path/to/wincurl/index.js"></script>

<!-- WinCurl Input -->
<textarea id="wincurl-input" placeholder="Paste curl request here..." rows="8"></textarea>
<button onclick="processInput()">Convert</button>

<!-- WinCurl Output -->
<div id="wincurl-output"></div>

Development

# Lint the project
npx eslint index.js

# Test the project
npm run test

Attribution

Source code came from roehnan with some small modifications.

Keywords

windows

FAQs

Package last updated on 12 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts