Here is a small Azure function, I am trying to get post form fields using node formidable.
module.exports = function (context, req, intable) {
var formidable = require('formidable');
var form = new formidable.IncomingForm(),
fields = [];
----> form.parse(context.req, function(err, fields, files) {
context.log(fields);
context.done();
return;
});
return;
};
In the line with arrow in code, it gives an error TypeError: req.on is not a function. Not sure what to do, any help will be appreciated.