所以我下面的教程创建twilio的XML文档等为response
, (https://www.twilio.com/blog/2013/03/introducing-the-twilio-module-for-node-js.html)生成动态Twiml响应和保存的NodeJS服务器上
而不是发送它作为回应,我想在我的服务器上生成稍后访问的文件。
像 - 本地主机/文件/ USERNAME/filename.xml中
这是我当前的代码,该文件将作为响应。
var resp = new twilio.TwimlResponse();
resp.say({voice:'woman'}, 'Thanks for calling!');
//Render the TwiML document using "toString"
res.writeHead(200, {
'Content-Type':'text/xml'
});
res.end(resp.toString());