I receive the data from my server as an object as you can see here:
When I load that into Array as JSON, the array seems to be empty. But, when doing a Log of AJAX.lastData I do get the data as a string.
I have also tried sending only { name: "smth", lastname: "smth2" }, but the array is still empty.
File: drive.google.com/file/d/1EthiBLhjB-e6vEAI2T9iJ0IuCn8ymD66/view
I created a sample node.js. you can try this.
oyunkulturu.com/temp/nodepost.zip
oyunkulturu.com/temp/nodepost.webm
Sorry I updated the post right about now, I managed to receive data in my server. But, I'm having trouble loading the response data to an array in Construct. Though thanks for the the files, I see now why req.body didn't work for me!
Develop games in your browser. Powerful, performant & highly capable.
why req.body didn't work for me!
are you using body-parser and have you looked at the example here?
npmjs.com/package/router
Yes, I am using body parser and I receive data normally as expected in Postman (also req.body now works due to your help). The server is now fine. That's not the issue anymore; my issue is loading the received object from my server into a Construct array so that I can do Array.At(0, 1) and get e.g. firstName.