I am using node.js restify.
I have a HTTP Post handler that looks something like this;
var api_post_records = function (app, url_path) {
function post_handler(req, res, next) {
//code runs here
res.send("ok"); //have to run some response back, otherwise python http post requests will hang
app.post(url_path, post_handler);
}
If I remove the res.send("ok");
line, it will cause python http post requests to hang. I don't know why. Hope someone can provide the answer. I have to send some dummy HTTP response so as not to hang the python requests. Although current code works, I would like to know what should a proper HTTP response be if the HTTP post works fine.