var postData = function()

in functions/source/CreateIncident/index.js [11:23]


var postData = function (params) {

    var post_request = https.request(params.post_options, function (res) {
        var body = '';

        res.on('data', chunk => body += chunk);
        res.on('end', () => params.callback(null, JSON.parse(body)));
        res.on('error', e => context.fail('error:' + e.message));
    });

    post_request.write(params.post_data);
    post_request.end();
};