generated from bitprj/cabin
-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
Description
Identify Steps:
- Step 6
Week:
Week 3
Describe the Issue
- Azure Function(s) as a product name need to start with capital letters - needs to be checked for all sessions
- Fix the Twilio code to be compliant with Twilio's expectations of a response object
Proposed Fix
- Set Azure Functions to caps
- Adjust the code sample (Attention new dependency to twilio package):
const MessagingResponse = require('twilio').twiml.MessagingResponse;
...
const queryObject = qs.parse(req.body);
const twilioResponseMessage = new MessagingResponse();
twilioResponseMessage.message('You said: ' + queryObject.Body);
context.res = {
status: 200,
body: twilioResponseMessage.toString(),
headers: { 'Content-Type': 'application/xml' },
isRaw: true
};