mikeal/request — pull request #175 by GabrielL (2012-02-18 11:21:42+00:00)
Title: GET request on lighttpd are now working

GET request should not have content-length: 0 in headers, this cause a Bad
Request response in lighttpd.

This code sample is now working :

var request = require('request');
var util = require('util');

request({ uri: 'http://piratebay.se' }, function (error, response, body) {
if (!error && response.statusCode == 200) {
util.puts(body);
} else {
if (error)
console.log("error :", error);
console.log("statusCode :", response.statusCode);
}
});