Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Some extra functions that node.js needs
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
docs
lib
test
index.js
makefile
package.json
readme.md

readme.md

Node Needs...

net

get, post, put, delete

net.get(url, data, onResponse);
net.post(url, data, onResponse);
net.put(url, data, onResponse);
net.delete(url, data, onResponse);

function onResponse (err, response) {
  console.log(response);
}

request

net.request(url, options, function (err, response) {
  console.log(response);
});

options

{
  url : url
  method : 'GET' | 'POST' | 'PUT' | 'DELETE'
  data : {}
}

TODO options

timeout  // max time to wait (default?)
username // http simple auth
password // http simple auth
content type // e.g. json
agent    // handling concurrency
Something went wrong with that request. Please try again.