Skip to content

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

Notifications You must be signed in to change notification settings

AkaruStudio/curljs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

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

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%