Node Script は URL を呼び出し、応答を取得し、応答のいくつかの変数を使用して次の URL を呼び出す必要があります。出来ますか?
以下の例では、他のスクリプトでトークンを使用しています。
var http = require('http');
var options = {
host: 'url' ,
path: '/path',
method: 'POST'
};
var req = http.request(options, function(res) {
token="hi"; // to be populated by res
});
req.end();
exports.token = token