github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/builtin/providers/aws/test-fixtures/lambda_func.js (about)

     1  var http = require('http')
     2  
     3  exports.handler = function(event, context) {
     4      http.get("http://requestb.in/10m32wg1", function(res) {
     5          console.log("success", res.statusCode, res.body)
     6      }).on('error', function(e) {
     7          console.log("error", e)
     8      })
     9  }