json - Weird output coming from express' req.query -
I am calling a This is my data And sending In the path of my I can not get the values using The problem is not being set properly from your request headings (Content Type: JSON), because You are sending a string. To show your post that you are using jQuery, you do not need to empower your data, send it as JSON and jQuery, set the right title: AJAX to call server-side process of some nodes.
object
var data = {field1: value1, field2: value2}
data: Data to call using JSON.stringify (data)
node ,
Req.query as follows:
{'{"field1": "7", "field2": "7"}': ''}
req.query.field1 , how can I format this output so that I can move forward?
$ Ajax ({type: post}, url: "/ someurl", data: {field1: "7", field 2: "7"}}) done (function (msg) {warning ("data saved:" + msg );});
Comments
Post a Comment