Convert curl format to json
npm install @bany/curl-to-json
npm i @bany/curl-to-json
`
Usage
`js
const parse = require('@bany/curl-to-json');var out = parse(
your_curl);`
Example
`js
const parse = require('@bany/curl-to-json');var out = parse(
curl -X GET 'http://localhost:3001/search?search=react&asdfa=asfdaf' \);
console.log(out)/**
{
method: 'GET',
header: {
'xapi-key': '21432139847290402402190',
'Content-Type': 'text/html'
},
url: 'http://localhost:3001/search',
origin: 'http://localhost:3001',
params: { search: 'react', asdfa: 'asfdaf' },
body: { name: 'string', name2: 'string' }
} */
``Welcome new issue or feature request.
If you want to colaborate check the project's issues.
1. Fork the repository
2. Implement your solution
3. Commit
4. Open a Pull Request
Thanks!