Utilizing the webhook feature of Typeform to convert results to JSON when a user submits the embedded survey is working perfectly when tested with RequestBin. However, after exposing my local app using ngrok with the command
ngrok http 3000
and setting the route as the webhook target URL in Express:
app.post('/receiveWebhook', function(req, res){
console.log(req);
console.log(req.title);
res.send(200);
});
The server-side output is not as expected:
IncomingMessage {
_readableState:
ReadableState {
objectMode: false,
highWaterMark: 16384,
buffer: [],
length: 0,
pipes: null,
pipesCount: 0,
flowing: null,
ended: false,
endEmitted: false,
reading: false,
sync: true,
needReadable: false,
emittedReadable: false,
....
body: {},
params: {},
...
(can post the entire contents on Dropbox if comments think it is necessary)
When testing the route with Postman, only this appears in the Raw Body:
{"title": "Test"}
This data does not match what should be logged by the console statements in the Express route provided above.
Curious why the data is correctly received through RequestBin but not on the actual server-side of the local app?