Last active
September 29, 2015 12:08
-
-
Save joshkh/37bc127a522abae98059 to your computer and use it in GitHub Desktop.
IMJS 3.15.0-beta1 custom headers.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://cdn-dev.intermine.org/js/intermine/imjs/3.15.0/im-3.15.0-beta1.js"></script> | |
</head> | |
<body> | |
<script> | |
var customHeaders = { | |
"Authorization": "AIP-TOKEN-1234" | |
} | |
var flymine = new intermine.Service({ | |
root: 'www.flymine.org/query', | |
token: "1NT3RM1N3T0K3N", // will be overriden by the custom authorization header in {customHeaders} above. | |
headers: customHeaders | |
}); | |
flymine.fetchLists().then(function(lists) { | |
console.log("lists", lists); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment