Last active
February 14, 2024 07:39
-
-
Save kixorz/3b172e2fc3ce35421ee9 to your computer and use it in GitHub Desktop.
Revisions
-
kixorz revised this gist
Sep 17, 2015 . No changes.There are no files selected for viewing
-
kixorz created this gist
Sep 17, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ var http = require('http'); exports.handler = function(event, context) { http.get('http://httpbin.org/get', function(res) { var body = ''; res.on('data', function(chunk) { body += chunk; }); res.on('end', function() { console.info(body); context.done(null); }); }).on('error', function(e) { console.error(e.message); context.fail(null); }); };