When I do a POST request for the first time, the request pushes through with no problems. But if I do it a second or more times, it consistently fails.
Here is the log of the results:
POST /facebookGroups/ 201 25.756 ms - 28
TypeError: doc.hasOwnProperty is not a function
at C:\Users\ARebel\AppData\Roaming\npm\node_modules\json-server\node_modules\underscore-db\src\index.js:36:15
at baseFindIndex (C:\Users\ARebel\AppData\Roaming\npm\node_modules\json-server\node_modules\lodash\lodash.js:823:11)
at findIndex (C:\Users\ARebel\AppData\Roaming\npm\node_modules\json-server\node_modules\lodash\lodash.js:7260:14)
at Function.find (C:\Users\ARebel\AppData\Roaming\npm\node_modules\json-server\node_modules\lodash\lodash.js:5124:21)
at Function.getById (C:\Users\ARebel\AppData\Roaming\npm\node_modules\json-server\node_modules\underscore-db\src\index.js:35:17)
at Function.insert (C:\Users\ARebel\AppData\Roaming\npm\node_modules\json-server\node_modules\underscore-db\src\index.js:48:18)
at C:\Users\ARebel\AppData\Roaming\npm\node_modules\json-server\node_modules\lodash\lodash.js:4405:28
at arrayReduce (C:\Users\ARebel\AppData\Roaming\npm\node_modules\json-server\node_modules\lodash\lodash.js:704:21)
at baseWrapperValue (C:\Users\ARebel\AppData\Roaming\npm\node_modules\json-server\node_modules\lodash\lodash.js:4404:14)
at LodashWrapper.wrapperValue (C:\Users\ARebel\AppData\Roaming\npm\node_modules\json-server\node_modules\lodash\lodash.js:9052:14)
POST /facebookGroups/ 500 21.789 ms - 1272
The only way for me to send a POST request again is to restart the server. After that, the request succeeds once, then fails again afterwards.
For some reason, it seems to be looking for 'doc.hasOwnProperty" which I have no idea why it only does so the second time.
I'm also not doing anything special, just using Curl in Haxe shown below:
var r2 = haxe.Curl.post("http://localhost:3000/facebookGroups/", "test=1");
trace("POST" + r2);
I'll add that this same thing happens with just plain old Http requests (No cURL).
Hope someone can help me out.
Thanks!
When I do a POST request for the first time, the request pushes through with no problems. But if I do it a second or more times, it consistently fails.
Here is the log of the results:
The only way for me to send a POST request again is to restart the server. After that, the request succeeds once, then fails again afterwards.
For some reason, it seems to be looking for 'doc.hasOwnProperty" which I have no idea why it only does so the second time.
I'm also not doing anything special, just using Curl in Haxe shown below:
I'll add that this same thing happens with just plain old Http requests (No cURL).
Hope someone can help me out.
Thanks!