I am working on a Padrino app
running on my local server(localhost:3000)
. I am exposing a get call /location which is returning a json response. I am hitting this API from the javascript code written separately. Here is what i am writing:
$.get("http://localhost:3000/location", function(data) {
alert("Inside callback" + data);
});
(PS : using jquery 1.9.1
, tried getJSON also) The http end point is getting hit and returning sucess code 200 with json response but the success call back handler is not being called in the javascript. Why is that happening? Any way to do so?