Gathering detailed insights and metrics for curl-parser-js
Gathering detailed insights and metrics for curl-parser-js
Gathering detailed insights and metrics for curl-parser-js
Gathering detailed insights and metrics for curl-parser-js
parse-curl-js
An better cURL string parser
parse-curl-js-fixed
An better cURL string parser
@taktikorg/unde-animi-omnis
<p align="center"> <a href="https://www.npmjs.com/package/@taktikorg/unde-animi-omnis"><img src="https://img.shields.io/npm/v/@taktikorg/unde-animi-omnis"></a> <a href=""><img src="https://img.shields.io/github/actions/workflow/status/RemiMyrset/@taktikor
@crabas0npm2/vel-sapiente-accusamus
security holding package
npm install curl-parser-js
Typescript
Module System
Node Version
NPM Version
69.7
Supply Chain
94.6
Quality
74.9
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
9,985
Last Day
5
Last Week
19
Last Month
69
Last Year
1,026
MIT License
17 Stars
17 Commits
6 Forks
1 Watchers
1 Branches
2 Contributors
Updated on Apr 02, 2024
Minified
Minified + Gzipped
Latest Version
0.0.3
Package Id
curl-parser-js@0.0.3
Size
111.74 kB
NPM Version
5.5.1
Node Version
7.10.0
Cumulative downloads
Total Downloads
Last Day
150%
5
Compared to previous day
Last Week
18.8%
19
Compared to previous week
Last Month
-8%
69
Compared to previous month
Last Year
-81.1%
1,026
Compared to previous year
Final javascript size is 2.58kB only!!
Simple javascript library to parse cUrl command
to json object
. Regex based matching without adding any complex parser code/library. Can be used in Node
, in any frontend project
or as standalone js file
.
With the generated json object you may construct your own ajax
call using your favourite
library.
Add your script tag
<script src="https://cdn.jsdelivr.net/npm/curl-parser-js@0.0.3/dist/parse-curl.js"></script>
Parse your cmd
const curlCmd = `curl 'http://server.com:5050/a/c/getName/?param1=pradeep¶m2=kumar¶m3=sharma'`;
parse_curl_js.parse(curlCmd);
import Curlparser from 'curl-parser-js';
Assume you have your `cUrl` command as a string constant
const curlCmd = `curl 'http://server.com:5050/a/c/getName'`;
### Execute parser to parse the curl command
const result = parsecurl(curlCmd);
console.log(JSON.stringify(result, null, 2));
will result in
{
"url": "http://server.com:5050/a/c/getName",
"headers": {}
}
const curlCmd = `curl 'http://server.com:5050/a/c/getName/?param1=pradeep¶m2=kumar¶m3=sharma'`;
const result = parsecurl(curlCmd);
console.log(JSON.stringify(result, null, 2));
will result in
{
"url": "http://server.com:5050/a/c/getName/?param1=pradeep¶m2=kumar¶m3=sharma",
"headers": {},
"queryString": {
"param1": "pradeep",
"param2": "kumar",
"param3": "sharma"
}
}
const curlCmd = `curl 'https://exampleserver.com/api/v5/tracktime/' -H 'origin: https://exampleserver.com' -H 'accept-encoding: gzip, deflate, br' -H 'accept-language: en-GB,en-US;q=0.8,en;q=0.6' -H 'authorization: JWT eyJiOjE1MTIyMTIyNzYsIm9yaiOjE1MTIyMTIyNzYsIm9yaJ9.eyJ2ZXJzaW9uIjoiMjciLCJleHAiOjE1MTIyMTIyNzYsIm9yaiOjE1MTIyMTIyNzYsIm9yaLCJ1c2VyX2lkIjo1MTAsImVtYWlsIjoibWFydWRodS5ndW5iOjE1MTIyMTIyNzYsIm9yam5hbWUiOiJtYXJ1ZGh1Lmd1iOjE1MTIyMTIyNzYiOjE1MTIyMTIyNzYsIm9yafQ._BuiOjE1MTIyMTIyNzYsIm9yadJ__2iOjE1MTIyMTIyNzYsIm9yaRTmNcW0' -H 'content-type: application/json; charset=UTF-8' -H 'accept: */*' -H 'referer: https://exampleserver.com/timeSheetChange' -H 'authority: exampleserver.com' -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36' --data-binary '{"action":"Add custom time","data":"November 27, 2017 - December 03, 2017"}' --compressed`;
const result = parsecurl(curlCmd);
console.log(JSON.stringify(result, null, 2));
will result in
{
"url": "https://exampleserver.com/api/v5/tracktime/",
"headers": {
"origin": "https",
"accept-encoding": "gzip, deflate, br",
"accept-language": "en-GB,en-US;q=0.8,en;q=0.6",
"authorization": "JWT eyJiOjE1MTIyMTIyNzYsIm9yaiOjE1MTIyMTIyNzYsIm9yaJ9.eyJ2ZXJzaW9uIjoiMjciLCJleHAiOjE1MTIyMTIyNzYsIm9yaiOjE1MTIyMTIyNzYsIm9yaLCJ1c2VyX2lkIjo1MTAsImVtYWlsIjoibWFydWRodS5ndW5iOjE1MTIyMTIyNzYsIm9yam5hbWUiOiJtYXJ1ZGh1Lmd1iOjE1MTIyMTIyNzYiOjE1MTIyMTIyNzYsIm9yafQ._BuiOjE1MTIyMTIyNzYsIm9yadJ__2iOjE1MTIyMTIyNzYsIm9yaRTmNcW0",
"content-type": "application/json; charset=UTF-8",
"accept": "*/*",
"referer": "https",
"authority": "exampleserver.com",
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36"
},
"body": {
"action": "Add custom time",
"data": "November 27, 2017 - December 03, 2017"
}
}
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 1/9 approved changesets -- score normalized to 1
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
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
73 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-04-28
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