Created
October 2, 2015 08:27
-
-
Save stevenbeeckman/b5fadaffdf9d1350cdfc to your computer and use it in GitHub Desktop.
HTTP GET through AJAX with jQuery in the browser.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Docs: http://api.jquery.com/category/ajax/ | |
$.ajax({ | |
type: "GET" | |
, url: "api/locations.php" | |
, dataType: "json" //this can be json, XML, ... | |
, success: function(data){ | |
console.dir(data); | |
, error: function(err){ | |
console.dir(err); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment