ajax get request
$.ajax({ url: "https://app.asana.com/-/api/0.1/workspaces/", type: 'GET', dataType: 'json', // added data type success: function(res) { console.log(res); alert(res); } });
Source: stackoverflow.com
jquery ajax get
$.ajax({ url: "www.site.com/page", success: function(data){ $('#data').text(data); }, error: function(){ alert("There was an error."); } });
ajax get method in jquery
$.get("demo_test.asp", function(data){ //change demo_test.asp to your server route alert("Data: " + data); });