Skip to content

Instantly share code, notes, and snippets.

@philippslang
Created July 9, 2018 14:58
Show Gist options
  • Save philippslang/205da09543e3ea439f02a5d9e04e38c4 to your computer and use it in GitHub Desktop.
Save philippslang/205da09543e3ea439f02a5d9e04e38c4 to your computer and use it in GitHub Desktop.
Azure lambda post
var request = require('request');
module.exports = function(context, perf) {
request('http://ixciperf.westeurope.cloudapp.azure.com:5000/api/update', function (error, response, body) {
if (error) {
context.log(error);
}
if (!error && response.statusCode == 200) {
context.log("JavaScript blob trigger function processed blob \n Name:", context.bindingData.name, "\n Blob Size:", perf.length, "Bytes");
}
context.done();
});
context.done()
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment