Wraps the functionality of curl into an easy to use node module
Note: requires curl installation
curljs uses curl so make sure you have it installed first
http://curl.haxx.se/docs/install.html
$ [sudo] npm install curljs
include the library in your node.js file
var curl = require("curljs");
var dataObject = {firstParam : "first value", secondParam : "second value"};
var curlOpts = curl.opts.silent()
.ignore_cert()
.follow_redirects()
.max_redirs(5)
.connect_timeout(3)
.post_data(dataObject);
curl("www.example.com", curlOpts, function(err, data, stderr) {
// do something
}
.verbose (boolean)
.follow_redirects (boolean)
.silent (boolean)
.ignore_cert (boolean)
.max_redirs (int)
.connect_timeout (int)
.ntlm (boolean)
.ntlm_proxy (boolean)
.post_data (object)
.post_data_urlencode (object)