我是节点新手,使用stormpath 获取自定义数据,我的服务器代码检索组中的帐户以及每个帐户的自定义数据。它应该向客户端发送数据..但是我收到错误..任何帮助都会有所帮助,谢谢。
错误:“发送后无法设置标题。”
app.post('/profile/cards', bodyParser.json(),ExpressStormpath.loginRequired,function(req, res) {
var href="https://api.stormpath.com/v1/groups/2D48mI3C9uBFJAFW3pp7Kv";
client.getGroup(href,function(err,group){
group.getAccounts(function(err,accounts){
accounts.each(function(account,cb){
account.getCustomData(function(err,CustomData){
res.send(CustomData);
});
cb();
},function(err){
console.log('Finished iterating over accounts');
});
});
});
});