書き方自体はgetと大して変わらないみたいですね。
リクエストオブジェクトreq
のbody
で取得できます。
app.post('/test', function(req, res) {
res.send(req.body);
});
使う側はhttp://SERVER:PORT/test
にPOSTアクセスします。
More than 5 years have passed since last update.
書き方自体はgetと大して変わらないみたいですね。
リクエストオブジェクトreq
のbody
で取得できます。
app.post('/test', function(req, res) {
res.send(req.body);
});
使う側はhttp://SERVER:PORT/test
にPOSTアクセスします。
Register as a new user and use Qiita more conveniently