Why does
$.get("/some-url", function(response-data){ #do something with response-data });
work in my project
but
$.get({
url: "/some-url",
success: function() {
#do something with response data
},
});
give me a bad request error...?
As far as I can tell, when I use url:
the string is being converted into an object or something. The request is sent to localhost:3000/object%20Object, while when I use the first way it gets routed correctly.
What am I missing?! This is blowing my mind. Thanks!