Skip to content

Instantly share code, notes, and snippets.

@fuzzy
Created October 13, 2017 04:34
Show Gist options
  • Save fuzzy/7a6d0bf566ce9419040b69d978fe1fc0 to your computer and use it in GitHub Desktop.
Save fuzzy/7a6d0bf566ce9419040b69d978fe1fc0 to your computer and use it in GitHub Desktop.
var remote = new XMLHttpRequest();
remote.onreadystatechange == function() {
console.log(this.responseText);
postMessage(this.responseText);
};
remote.open("GET", "/salt/events", true);
remote.setRequestHeader("X-Auth-Token", "{{salt_api_token}}");
remote.send();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment