How to make Post request in Node.js?

 var request = require('request');

request.post(
    'http://www.example.com/action',
    { form: { key: 'value' } },
    function (error, response, body) {
        if (!error && response.statusCode == 200) {
            console.log(body)
        }
    }
);

Comments

Popular posts from this blog

What test framework did you use to test your nodejs applications

What is V8 Engine? What is the relationship between Node.js and V8?