1

To make a POST request with a Body full of JSON Data as Payload I use:

$http.post('http://westeros:9000/model/create/', theBody).success(function(retData, status, headers, config){....});

I am seeing this in Firebug:

XSSR

In Node.JS I am seeing two POST requests being made when I use:

console.log(req.method);

Interesing: One Payload (Body) is empty and one is as expected. I really would like to know if somebody has seen this issue or if I might have a bug elsehwhere.

Stephan Kristyn
  • 15,015
  • 14
  • 88
  • 147
  • Preflight request are sent by browsers regardless what library/framework are you using to make the requests. What is doing mongo here ?, you are logging all requests or something like that ? – dseminara Sep 16 '14 at 15:28
  • I understand I will rephrase my question then. Problem is: Express routes the OPTIONS request to Mongoose as well and I am seeing two MongoDB requests, one with and one without `req.body` payload. – Stephan Kristyn Sep 17 '14 at 07:51

0 Answers0