Intro-To-Serverless
Intro-To-Serverless copied to clipboard
[Content Bug] Response Week 3 step 6 - Twilio Code Sample
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
};
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@emsesc @ganning127 : Can we add the pinned label to the issues that should be done after the summer session so that they are ignored by the stale bot?