node curl wrapper with fully implemented https://npmjs.org/package/node-curl
Find a file
jiangfriend@gmail.com f8f934a119 first commit
2012-02-14 14:56:03 +08:00
examples first commit 2012-02-14 14:56:03 +08:00
lib first commit 2012-02-14 14:56:03 +08:00
src first commit 2012-02-14 14:56:03 +08:00
.gitignore first commit 2012-02-14 14:56:03 +08:00
.npmignore first commit 2012-02-14 14:56:03 +08:00
index.js first commit 2012-02-14 14:56:03 +08:00
index.toffee first commit 2012-02-14 14:56:03 +08:00
package.json first commit 2012-02-14 14:56:03 +08:00
README.md first commit 2012-02-14 14:56:03 +08:00
wscript first commit 2012-02-14 14:56:03 +08:00

Node Curl Wrap Use select curl multi

Quick Start

curl = require('node-curl') curl('www.google.com', {VERBOSE: 1}, function(err, res) { console.info(res.status) console.info('-----') console.info(res.body) console.info('-----') console.info(res.info('SIZE_DOWNLOAD')) });

Usage

Function: curl curl(url, [options = {}], callback) callback includes 2 parameters (error, result)

Curl Options: options is on the list at http://curl.haxx.se/libcurl/c/curl_easy_setopt.html without CURLOPT_ eg: CURLOPT_VERBOSE will be VERBOSE, CURLOPT_HEADER will be HEADER

Object: result body status info

Curl Infos: infos is on the list at http://curl.haxx.se/libcurl/c/curl_easy_getinfo.html without CURLINFO_ eg: CURLINFO_EFFECTIVE_URL will be EFFETCTIVE_URL