Twilio 节点额外参数 [英] Twilio node extra parameters
本文介绍了Twilio 节点额外参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 twilio nodejs 包装器进行调用,如下所示:
I am making a call using twilio nodejs wrapper as below:
client.makeCall({
to:'+1234567890',
from: '+12345678',
Method: "GET",
url:'http://www.example.com/twilio-xml'
}, function(err, responseData) {
if (err) {
console.log(err);
} else {
console.log(responseData.from);
console.log(responseData.body);
}
});
我需要将我的自定义参数传递给 http://www.example.com/twilio-xml
请求,以便可以根据它生成响应 twiml.如何实现?提前致谢.
I would need to pass my custom parameters to http://www.example.com/twilio-xml
request so that response twiml can be generated according to that. How can that be achieved? Thanks in advance.
推荐答案
Twilio 布道者在这里.
Twilio evangelist here.
发送额外参数的最简单方法是将它们作为查询字符串值附加到 URL 中:
The easiest way to send extra parameters is to append them to the URL as querystring values:
url:'http://www.example.com/twilio-xml?foo=bar'
希望有所帮助.
这篇关于Twilio 节点额外参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文