Skip to content

Instantly share code, notes, and snippets.

@awbauer
Last active August 29, 2015 14:10
Show Gist options
  • Save awbauer/89e952290aac281740c2 to your computer and use it in GitHub Desktop.
Save awbauer/89e952290aac281740c2 to your computer and use it in GitHub Desktop.
VCO API Requests
<form id="form">
Endpoint: <input type="text" id="endpoint" value="/workflows/" /> <input type="submit" />
</form>
<script>
(function(){
var form = document.getElementsByTagName('form');
form[0].addEventListener('submit', doSubmit);
function doSubmit(e){
e.preventDefault();
var client = new XMLHttpRequest();
client.open("GET", "https://VCO_SERVER_IP_ADDRESS/vco/api/workflows/");
client.withCredentials = true;
client.onreadystatechange = function() {
//console.log("done");
};
client.send();
}
})();
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment