curljs

0.1.2 • Public • Published

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)

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.1.2
    13
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.2
    13
  • 0.1.1
    1
  • 0.1.0
    1
  • 0.0.2
    1
  • 0.0.1
    1

Package Sidebar

Install

npm i curljs

Weekly Downloads

17

Version

0.1.2

License

none

Last publish

Collaborators

  • jcrowe