title: how to post data to another server through node js
body: <p>As i am new to node js not getting how to hold multiple data coming from the DyanmoDB and POST it to another SERVER, i am trying like this, please help me with some logics ....
      'use strict';</p>
  
  <pre><code>var http = require('http');
  
  console.log('Loading function');
  exports.handler = (event, context, callback) =&gt; {
  
      //event.forEach(function(event){
          console.log('Received event:', JSON.stringify(event, null, 2));
          var value1 =  event.key1;
          console.log(value1);
  
          var headers = {
              "Copntent-Type" : 'application/JSON'
          };
          var options = {
              url : "http://www.example.com/syncData.php",
              method : "POST",
              headers : headers,
              body     : data
          };
          request(options, function(error, response, body){
              console.log("Sending");
              postData(value1, end, end+1000);
          });
  </code></pre>
  
  <p>its giving error :</p>
  
  <p>{
    "errorMessage": "RequestId: 61712ab7-d956-11e6-be00-bd64296711ef Process exited before completing request"
  }</p>