node-twilio
node-twilio copied to clipboard
undefined request params
I there I have this code
phone.on('incomingSms', function(smsParams, response) {
console.log("REQUEST:");
console.log(smsParams);
var from = smsParams.From;
...
});
And when I get a response I see this in my logs
012-01-20T00:00:41+00:00 app[web.1]: REQUEST:
2012-01-20T00:00:41+00:00 app[web.1]: undefined
2012-01-20T00:00:41+00:00 app[web.1]: TypeError: Cannot read property 'From' of undefined
Am I doing something wrong? This seems like the exact way the docs do it.
Thank you!
Forgot bodyParser() for express. I'm good now.
Hmm, interesting. Can you post the rest of your code (initialization)?
Thanks, Stephen
On Thu, Jan 19, 2012 at 4:12 PM, Eric Koslow < [email protected]
wrote:
I there I have this code
phone.on('incomingSms', function(smsParams, response) { console.log("REQUEST:"); console.log(smsParams); var from = smsParams.From; ... });And when I get a response I see this in my logs
012-01-20T00:00:41+00:00 app[web.1]: REQUEST: 2012-01-20T00:00:41+00:00 app[web.1]: undefined 2012-01-20T00:00:41+00:00 app[web.1]: TypeError: Cannot read property 'From' of undefinedAm I doing something wrong? This seems like the exact way the docs do it.
Thank you!
Reply to this email directly or view it on GitHub: https://github.com/sjwalter/node-twilio/issues/19