title: Unable to send xml response with serverless framework
body: <p>I'm working with twilio in which when call comes to my twilio number it invokes webhook, I'm using lambda function as webhook, </p>
  
  <p>twilio expects xml(formerly called twiml) response from webhook and i'm unable to send xml response from lambda function</p>
  
  <p>I'm using serverless framework</p>
  
  <p>here is my code
  <strong>function:</strong></p>
  
  <pre><code>module.exports.voice = (event, context, callback) =&gt; {
  
    console.log("event", JSON.stringify(event))
    var twiml = new VoiceResponse();
  
    twiml.say({ voice: 'alice' }, 'Hello, What type of podcast would you like to listen? ');
    twiml.say({ voice: 'alice' }, 'Please record your response after the beep. Press any key to finish.');
  
    twiml.record({
      transcribe: true,
      transcribeCallback: '/voice/transcribe',
      maxLength: 10
    });
  
    console.log("xml: ", twiml.toString())
  
    context.succeed({
      body: twiml.toString()
    });
  };
  </code></pre>
  
  <p><strong>yml:</strong></p>
  
  <pre><code>service: aws-nodejs
  
  provider:
    name: aws
    runtime: nodejs6.10
    timeout: 10
  
  iamRoleStatements:
      - Effect: "Allow"
        Action: "*"
        Resource: "*"
  
  functions:
    voice:
      handler: handler.voice
      events:
        - http:
            path: voice
            method: post
            integration: lambda
            response:
              headers:
                Content-Type: "'application/xml'"
            template: $input.path("$")
            statusCodes:
                  200:
                      pattern: '.*' # JSON response
                      template:
                        application/xml: $input.path("$.body") # XML return object
                      headers:
                        Content-Type: "'application/xml'"
  </code></pre>
  
  <p><strong>Response:</strong>
  <a href="https://i.stack.imgur.com/x5F0O.png" rel="noreferrer"><img src="https://i.stack.imgur.com/x5F0O.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/gg9vy.png" rel="noreferrer"><img src="https://i.stack.imgur.com/gg9vy.png" alt="enter image description here"></a></p>
  
  <p>please let me know if I'm making some mistake in code
  also created an <a href="https://github.com/serverless/serverless/issues/3568" rel="noreferrer">issue</a> on github</p>
  
  <p>Thanks,
  Inzamam Malik</p>