Skip to content

Instantly share code, notes, and snippets.

@palcu
Created July 1, 2015 14:04
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 palcu/9d104831a336aa1b402b to your computer and use it in GitHub Desktop.
Save palcu/9d104831a336aa1b402b to your computer and use it in GitHub Desktop.
<html>
<head></head>
<body>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.js"></script>
<script>
$(function(){
$.ajaxSetup({
beforeSend: function (request) {
request.setRequestHeader("Authorization", "9:2sPtL9PnthjxQJEFDztK");
},
});
$.ajax({
method: 'GET',
url: 'http://localhost:3000/v1/contestants.json',
success: function(data) {
console.log(data);
},
error: function(data) {
console.log(data);
}
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment