0 votes
87 views
in Node.js by (4.4k points)
How to make post request in Node.js ?

1 Answer

0 votes
by (4.4k points)

Following code snippet can be used to make a Post Request in Node.js.

var request = require('request');

request.post('http://www.developerhelpway.com/action', { form: { key: 'value' } },

function (error, response, body) {

if (!error && response.statusCode == 200) {

    console.log(body)

}

});

Share:- Whatsapp Facebook Facebook


Welcome to Developerhelpway Q&A, where you can ask questions and receive answers from other members of the community.

Categories

...