概要 APIを叩いたりする時に役立ちそうだからやってみる。 準備 ライブラリ 以下のライブラリを使う。 request ライブラリ準備 $ npm install request コード URLに対してPOSTリクエストで、valueとhugaを送っている。 Content-Typeは「application/x-www-form-urlencoded」となっている。 var request = require('request'); // URL var baseUrl = 'http://hogehoge.com/hugahuga'; request.post( baseUrl, { form: { key: 'value', hoge: 'huga'} }, function (err, res, body) { if (!err && res.statusCode == 200)