Node.js cURL Equivalent

You’ll need to install axios to run the equivalent cURL capabilities in Node.js. To do that run the following command

npm install --save axios

Lets convert the cURL command below to check public IP.


This will be the equivalent in axios

const axios = require('axios');
async function run(){
var options = {
method: 'GET',
url: '',
.then(function (response) {
// handle success…