2011年01月28日18:58 続・簡易なHTTPクライアントを node.js で カテゴリ 前述の「簡易なHTTPクライアントを node.js で」では、単独のスクリプトで応用が効かない。先程のファイル内の get関数を再利用するため、モジュール化してみる。 そのため少しコードとスクリプト名をいじる get -> lwp_simple.js に変更する 「myModule/lwp_simple.js」に配置する lwp_simple.js(モジュール) exports.get = function (url, func) { var url_parse = /^(?:(http|https):\/\/)([0-9.\-A-Za-z]+)(?::(\d+))?(\/.*)?$/; if (! url.match(url_parse)) return console.log('not