Skip to content

Instantly share code, notes, and snippets.

@lukaselmer
Created October 26, 2011 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukaselmer/1316388 to your computer and use it in GitHub Desktop.
Save lukaselmer/1316388 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
function f() {
console.log("bla");
$.ajax({
url : 'http://152.96.80.18:8080/api/trails',
type : 'get',
'dataType' : "jsonp",
data : {
format : "json"
},
success : function(data) {
console.log(data);
alert(data);
},
//accepts: {'Accept': "application/json"},
//accepts: {'Accept': 'application/json'},
//dataType : "script text xml",
//contentType : "application/xml",
// 'accepts' : "application/json",
// 'contentType' : "application/json",
//'cache' : false
});
}
$(document).ready(f);
</script>
</head>
<body>
<div>asdf</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment