Getting empty data on Webhook for any doctype

Hi,

I have just setup a webhook for on_insert event on a doctype. I do get my API called but its body is empty. Tried a few things still not able to get it work. I am on v10.

can you share the code?

Also refer Introduction

I have just created a small http server with express in node.js to test it

var express = require("express");
var bodyParser = require("body-parser");
var app = express();
var port = 3000;
app.use(bodyParser.json());

app.post('/webhook', function (req, res) {    
    console.log(req.body);
    res.sendStatus(200);
});

app.listen(port, function () { console.log("Web server started"); });

I have tested this separately using POSTMAN, its working

Excellent thanks - code like that above can be found in this Mozilla tutorial Setting up a Node development environment - Learn web development | MDN

Sorry, didn’t get you? I don’t have problem with this above code. I am getting post request from Frappe’s server but not receiving any data. I have independently tested this server code and I receive body json otherwise. I hope my question is clear.

No actual problem I just wanted to refer to this Javascript tutorial - my 2 cents to add to the discussion. I have yet to get a handle on Postman and the problem you refer to…

ohh I thought you were pointing out some error in the javascript code. In any case thanks for adding that mozilla link.