title: Nodejs API call returning undefined to lambda function
body: <p>This is the aws lambda function which will invoke an api:</p>
  
  <pre><code>'use strict';
  
  var request = require("request")
  
  exports.handler = function (event, context,callback) {
  
  
  
  let url = "https://3sawt0jvzf.execute-api.us-east-1.amazonaws.com/prod/test"
  
  request({
      url: url,
      method: "POST",
      json: event,
  
  }, function (error, response, body) {
      if (!error &amp;&amp; response.statusCode === 200) {
          callback(null, { "isBase64Encoded": true|false,
                            "statusCode": "200",
                            "headers": { "headerName": "headerValue"},
                            "body": body});
      }
      else {
  
          console.log("error: " + error)
          console.log("response.statusCode: " + response.statusCode)
          console.log("response.statusText: " + response.statusText)
      }
  })
  };
  </code></pre>
  
  <p>This is the api written as an aws lambda function:</p>
  
  <pre><code>'use strict';
  
  
  exports.handler = function(event, context, callback) {
  console.log(event.name);
  callback(null, { "isBase64Encoded": true|false,
                   "statusCode": "200",
                   "headers": { "headerName": "headerValue"},
                   "body": `Hello World ${event.name}`});  // SUCCESS with message
  };
  </code></pre>
  
  <p>When I try to call the api from the lambda function it just returns "Hello World undefined". It is not appending the name at the end and returning the correct response. </p>