restData = currentNode.Restdata;
chain = {
name: currentNode.name,
body: function (job, cb) {
var client = restify.createClient({
url : restData.URL
});
switch (restData.Type) {
case 'GET':
return client.get('/', function (err, req, res, obj) {
if (err) {
return cb(err.name + ': ' + err.body.message);
} else {
return cb(null, 'Data found');
}
});
break;
default:
break;
}
}
};
In Above case, I can't access the restData variable into body: function () {}. Anyone can help me to solve this problem and i can access the restData into body function.
via Sudhir Vadodariya
No comments:
Post a Comment