curl2node
v0.0.5
Published
curl2node converts CLI curl command to Node.JS code.
Readme
curl2node
This is tool for converting curl bash command to Node.JS code.
Table of contents
Installation
yarn global add curl2nodeUsage
curl2node generator curl https://google.com If you would like to test if it will work first, feel free to use runner instead of generator.
curl2node runner curl https://google.com Generated code will look something like this:
const got = require("got");
const options = {
"url": "https://google.com"
};
got(options).then((data) => {
console.log(data);
}).catch((error) => {
console.error(error);
});