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);
}
net.request(url, options, function (err, response) {
console.log(response);
});
{
url : url
method : 'GET' | 'POST' | 'PUT' | 'DELETE'
data : {}
}
timeout // max time to wait (default?)
username // http simple auth
password // http simple auth
content type // e.g. json
agent // handling concurrency