node.jsでPOSTとかやるとちょっと面倒なんですよね。 ってことでモジュール化してみたよ。 使い方 GET var request = require('./request.js'); request.get( //request url 'http://localhost/test?test=THIS_IS_TEST', //success handler function(res){ console.log(res); } ).on('error',function(e){ //error handler console.log(e); }); POST var request = require('./request.js'); request.post( //request url 'http://localhost/test', //post params { "param