We are trying to do this:
require(‘isomorphic-fetch’)
module.exports = function (event) {
console.log(event.data)
return fetch(‘
https://requestb.in/187vlpq1', {
method: ‘post’,
headers: {
‘Content-Type’: ‘application/json’,
‘Access-Control-Allow-Origin’: ‘*’
},
body: JSON.stringify(event.data)
}).then((response) => {
console.log(response);
})
}