I have an ajax get request as below. I am making a GET request to server.js in openshift using nodejs express. However, i get html contents in the response method instead of
You can use res.json to send JSON response instead of res.send
res.json
res.send
res.json(obj)
This method also set Content-Type as application/json
Content-Type
application/json