Skip to content

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

curljs

Wraps the functionality of curl into an easy to use node module

Note: requires curl installation

Installation

Install curl first

curljs uses curl so make sure you have it installed first

http://curl.haxx.se/docs/install.html

Install curljs

$ [sudo] npm install curljs

Usage

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
}

Available Options

.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)

About

wraps curl functionality into an easy to use node.js module

Resources

Stars

6 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages