Skip to content

Instantly share code, notes, and snippets.

@chewbranca
Created August 22, 2012 19:59
Show Gist options
  • Save chewbranca/3428796 to your computer and use it in GitHub Desktop.
Save chewbranca/3428796 to your computer and use it in GitHub Desktop.
Testing Authorization headers in a couchapp
<html>
<head>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
$(function() {
$.when(
$.ajax("/_session"),
$.ajax("/test_couchapp2"),
$.ajax("/_all_dbs"),
$.ajax("/_session")
).done(function() {
console.log("GOT RESPONSES");
console.log(arguments);
});
});
</script>
</head>
<body>
<h1>Test Couchapp Session loading</h1>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment